Database Security. Database Auditing. Database Caching. Database Masking. Get it now

loglevel values?

in

Could anyone elaborate on possible values & their meaning for the loglevel directive?

Comments

According to the source

According to the source code, it seems to have 7 logLevel values (from 0 to 6)


enum ErrorType { CRIT, ERR, INFO, SQL_DEBUG, DEBUG, STORAGE, NET_DEBUG};
[...]
logevent(ErrorType type, const char * fmt, ...);
[...]
if (log_level < (int) type)
{
va_end(ap);
return;
}

Each logLevel will log from CRIT (ErrorType value 0) to the values corresponding to the ErrorType

For example, a logLevel 3 will log CRIT, ERR, INFO and SQL_DEBUG
A logLevel 2 : CRIT, ERR and INFO

and so on

Browsing through the

Browsing through the sourcecode is all fine but at least the few config-values should be documented better.

yea sure :p Futhermore, it

yea sure :p

Futhermore, it should be better to use the binary value of the logLevel to be able to log CRIT and DEBUG and not the others for example

Also i'm not really sure why

Also i'm not really sure why a loglevel of 3 already includes SQL_DEBUG.

Its output is HUGE - also, while having a loglevel of 10 (the default, if i recall right) the HDD of my Xen VM filled up and the whole server kinda fell over.

yea, the log system must be

yea, the log system must be changed :p

if you want to extract some of data from your greensql.log and clear if every hours, take a look there : http://code.google.com/p/mgreensql/wiki/LoggingSQLqueries (i'm logging only queries but you can modify the regex)

The fact is SQL_DEBUG log queries, packets and so on :x, it's these packets which fill the log file and make it huge

Back to top