axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Mengué (JIRA) <j...@apache.org>
Subject [jira] Commented: (AXIS2C-1460) Enable/disable logging at runtime
Date Fri, 05 Mar 2010 10:30:27 GMT

    [ https://issues.apache.org/jira/browse/AXIS2C-1460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841803#action_12841803
] 

Olivier Mengué commented on AXIS2C-1460:
----------------------------------------

I confirm this bug and approve the suggested fix.

> Enable/disable logging at runtime
> ---------------------------------
>
>                 Key: AXIS2C-1460
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1460
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 1.6.0
>         Environment: Binary distribution of Axis2C (1.6.0) deployed on WindowsXP2002/SP3
>            Reporter: Bojan Komazec
>            Priority: Minor
>
> Function axutil_env_enable_log sets 
>    env->log_enabled 
> but 
>    env->log->enabled 
> is tested in functions that write to file (like axutil_log_impl_log_debug). 
> Disabling logging via axutil_env_enable_log actually does not affect logging.
> Example code:
>    axutil_env_t* env = axutil_env_create_all(szLogFilePath, AXIS2_LOG_LEVEL_TRACE);
>    // logging is enabled by default 
>    AXIS2_LOG_DEBUG_MSG(env->log, "test 1");  // appears in log file
>    if(axutil_env_enable_log(env, AXIS2_FALSE) != AXIS2_SUCCESS)
>    {
>       // handle error			
>    }
>    AXIS2_LOG_DEBUG_MSG(env->log, "test 2");  // appears in log file
> Using  
>    env->log->enabled =  AXIS2_FALSE;
> instead of 
>    
>    axutil_env_enable_log(env, AXIS2_FALSE);  
> does the job.
> axutil_env_enable_log should maybe set axutil_log's member :
>     env->log->enabled = enable;
> I think that keeping the same information ("Is logging enabled") both in 
> axutil_env and axutil_log structures introduces redundancy.

-- 
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: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


Mime
View raw message