Turn Off YugabyteDB Master INFO Message Logging

The YB-Master service maintains the system metadata and records, including tables and the locations of their tablets, as well as users and roles with their associated permissions.

The YB-Master service is also responsible for coordinating background operations, such as load-balancing and initiating replication for under-replicated data. Additionally, it handles various administrative tasks, including creating, altering, and dropping tables.

YB-Master actions are logged and organized by error severity: INFO, WARN, ERROR and FATAL.

The log level is defined by the –minloglevel gFlag which can be set to one of the following values:  0 (INFO), 1 (WARN), 2 (ERROR), 3 (FATAL),  where 0 (INFO) is the default.

The YB-Master processes are very chatty and log ALOT of INFO messages. If you are only intertesed in non-INFO messages, you can turn them off.

Example:

				
					[root@Cloud_Server_0 ~]# yugabyted start | grep log
| Log Dir             : /root/var/logs                                                                     |

[root@Cloud_Server_0 ~]# grep "^I" /root/var/logs/master/yb-master.INFO | wc -l
984
				
			

Wow, there were 984 INFO entries added to the YB-Master log immediately after a start!

Now let’s see how many lines are written to the INFO log if we change the minimum log level to 1 (WARN).

				
					Stopped yugabyted using config /root/var/conf/yugabyted.conf.
Deleted logs at /root/var/logs.
Deleted data at /root/var/data.
Deleted conf at /root/var/conf.

[root@Cloud_Server_0 ~]# yugabyted start --master_flags="minloglevel=1" | grep log
| Log Dir             : /root/var/logs                                                                     |

[root@Cloud_Server_0 ~]# grep "^I" /root/var/logs/master/yb-master.INFO | wc -l
0
				
			
No INFO lines were written to Master INFO log!

Have Fun!

Dropped sunflower seeds under our bird feeder are growing!