You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Olivier Mengué (JIRA)" <ji...@apache.org> on 2010/03/05 11:30:27 UTC
[jira] Commented: (AXIS2C-1460) Enable/disable logging at runtime
[ 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