trema/trema — Issue #167: Logging Level
Author: r-mibu
Created: 2012-02-29 12:26:28+00:00
State: open

The logging level option "-l" doesn't work for me.
Everyone use "export LOGGING_LEVEL=DEBUG"?

I think this problem comes from init_log() in src/lib/log.c.
In init_trema(), parse_argv() is called and then init_log() is called.
Even if logging_level are set properly in parse_argv(), it will be overwriten in init_log().

src/lib/log.c:
154 bool
155 init_log( const char *ident, const char *log_directory, bool run_as_daemon ) {
156 pthread_mutex_lock( &mutex );
157
158 level = LOG_INFO;
159 char *level_string = getenv( "LOGGING_LEVEL" );
160 if ( level_string != NULL ) {
161 set_logging_level( level_string );
162 }
...