Author: damitha Date: Wed Nov 7 03:08:58 2007 New Revision: 592702 URL: http://svn.apache.org/viewvc?rev=592702&view=rev Log: implementing maximum file size configuration option for apache2 module
Modified: webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c Modified: webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c?rev=592702&r1=592701&r2=592702&view=diff ============================================================================== --- webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c (original) +++ webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c Wed Nov 7 03:08:58 2007 @@ -35,6 +35,7 @@ char *axutil_log_file; char *axis2_repo_path; axutil_log_levels_t log_level; + int max_log_file_size; } axis2_config_rec_t; @@ -56,6 +57,12 @@ void *dummy, const char *arg); +static const char * +axis2_set_max_log_file_size( + cmd_parms * cmd, + void *dummy, + const char *arg); + static const char *axis2_set_log_level( cmd_parms * cmd, void *dummy, @@ -98,6 +105,8 @@ "Axis2/C log file name"), AP_INIT_TAKE1("Axis2LogLevel", axis2_set_log_level, NULL, RSRC_CONF, "Axis2/C log level"), + AP_INIT_TAKE1("Axis2MaxLogFileSize", axis2_set_max_log_file_size, NULL, RSRC_CONF, + "Axis2/C maximum log file size"), AP_INIT_TAKE1("Axis2ServiceURLPrefix", axis2_set_svc_url_prefix, NULL, RSRC_CONF, "Axis2/C service URL prifix"), @@ -167,6 +176,26 @@ } static const char * +axis2_set_max_log_file_size( + cmd_parms * cmd, + void *dummy, + const char *arg) +{ + axis2_config_rec_t *conf = NULL; + const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); + if (err != NULL) + { + return err; + } + + conf = + (axis2_config_rec_t *) ap_get_module_config(cmd->server->module_config, + &axis2_module); + conf->max_log_file_size = 1024 * 1024 * atoi(arg); + return NULL; +} + +static const char * axis2_set_log_level( cmd_parms * cmd, void *dummy, @@ -381,10 +410,12 @@ { axutil_logger->level = conf->log_level; + axutil_logger->size = conf->max_log_file_size; AXIS2_LOG_INFO(axutil_env->log, "Apache Axis2/C version in use : %s", axis2_version_string()); - AXIS2_LOG_INFO(axutil_env->log, "Starting log with log level %d", - conf->log_level); + AXIS2_LOG_INFO(axutil_env->log, + "Starting log with log level %d and max log file size %d", + conf->log_level, conf->max_log_file_size); } axis2_worker = axis2_apache2_worker_create(axutil_env, conf->axis2_repo_path); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]