Disable logger prints an endless loop of "please check your log and buffer"
---------------------------------------------------------------------------

                 Key: AXIS2C-999
                 URL: https://issues.apache.org/jira/browse/AXIS2C-999
             Project: Axis2-C
          Issue Type: Bug
          Components: util
    Affects Versions: Current (Nightly)
            Reporter: Frank Huebbers


In our deployment scenario we would like to inhibit the generation of the log 
file. To this end, I am initiating the environment as follows:

m_axisEnv = NULL;
axutil_error_t *error = NULL;
axutil_allocator_t *allocator = NULL;
axutil_thread_pool_t *thread_pool = NULL;   
allocator = axutil_allocator_init(NULL);
error = axutil_error_create(allocator);
thread_pool = axutil_thread_pool_init(allocator);    
m_axisEnv = axutil_env_create_with_error_log_thread_pool(allocator, error, 
NULL, thread_pool);
axutil_env_enable_log(m_AxisEnv, AXIS2_FALSE);    
m_axisEnv->ref = 1;

This works in not generating an error report.

The problem that I still see, however, is that I seem to get an almost infinite 
amount of statements which read "please check your log and buffer". When 
tracking down the origin of this message, I saw that it comes from the log.c 
where it basically reads:

if (log)
{ 
 ...
}
else
    fprintf(stderr, "please check your log and buffer")

This basically means that if the log is not enabled, I'm going to be hamered 
with stderr messages even though this is my intended use case. There should 
probably be another test that if the log is not desired then the error is not 
printed.

For now, I solved it for my use case by simply returning if the "log" variable 
is not set and then recompiled, i.e.,:

if (!log)
   return;

Frank

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to