summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar damitha2010-06-28 21:06:36 +0000
committerGravatar damitha2010-06-28 21:06:36 +0000
commit7718bd0b42a978c408595c13f7b09e0a8341b8d7 (patch)
tree369a645aeb86a3f8a01da40a3f4d160d147322c8
parentb26bb4d1c81bf982162ad43b5bc7e8b7f240cf1f (diff)
downloadaxis2c-7718bd0b42a978c408595c13f7b09e0a8341b8d7.tar.gz
axis2c-7718bd0b42a978c408595c13f7b09e0a8341b8d7.tar.bz2
Applied patch AXIS2C-1460
git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@958738 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--util/include/axutil_env.h2
-rw-r--r--util/src/env.c16
2 files changed, 4 insertions, 14 deletions
diff --git a/util/include/axutil_env.h b/util/include/axutil_env.h
index d59e5de..347d028 100644
--- a/util/include/axutil_env.h
+++ b/util/include/axutil_env.h
@@ -69,7 +69,7 @@ extern "C"
axutil_log_t *log;
/** This flag indicate whether logging is enabled or not */
- axis2_bool_t log_enabled;
+ /* axis2_bool_t log_enabled; */ /* Deprecated use instead log->enabled */
/** Thread pool routines */
axutil_thread_pool_t *thread_pool;
diff --git a/util/src/env.c b/util/src/env.c
index 38b89d3..aa1bc4b 100644
--- a/util/src/env.c
+++ b/util/src/env.c
@@ -42,7 +42,7 @@ axutil_env_create(
env->log = axutil_log_create_default(allocator);
env->log->level = AXIS2_LOG_LEVEL_DEBUG; /* default log level is debug */
- env->log_enabled = AXIS2_TRUE;
+ env->log->enabled = AXIS2_TRUE;
/* Create default error struct */
env->error = axutil_error_create(allocator);
@@ -84,11 +84,6 @@ axutil_env_create_with_error_log(
env->error = error;
env->log = log;
- if(env->log)
- env->log_enabled = AXIS2_TRUE;
- else
- env->log_enabled = AXIS2_FALSE;
-
axutil_error_init();
env->ref = 1;
@@ -130,11 +125,6 @@ axutil_env_create_with_error_log_thread_pool(
env->thread_pool = pool;
- if(env->log)
- env->log_enabled = AXIS2_TRUE;
- else
- env->log_enabled = AXIS2_FALSE;
-
axutil_error_init();
env->ref = 1;
@@ -207,9 +197,9 @@ axutil_env_enable_log(
axutil_env_t *env,
axis2_bool_t enable)
{
- if(env)
+ if(env && env->log)
{
- env->log_enabled = enable;
+ env->log->enabled = enable;
return AXIS2_SUCCESS;
}