Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 32928 invoked from network); 1 Nov 2007 00:17:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2007 00:17:12 -0000 Received: (qmail 65699 invoked by uid 500); 1 Nov 2007 00:16:59 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 65674 invoked by uid 500); 1 Nov 2007 00:16:59 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 65663 invoked by uid 99); 1 Nov 2007 00:16:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 17:16:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 00:17:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CEDD77141F1 for ; Wed, 31 Oct 2007 17:16:50 -0700 (PDT) Message-ID: <13897128.1193876210843.JavaMail.jira@brutus> Date: Wed, 31 Oct 2007 17:16:50 -0700 (PDT) From: "Damitha Kumarage (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Commented: (AXIS2C-734) Enabling Service Level Custom Logs In-Reply-To: <15326949.1193354210762.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2C-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539260 ] Damitha Kumarage commented on AXIS2C-734: ----------------------------------------- I have tested this OK > Enabling Service Level Custom Logs > ---------------------------------- > > Key: AXIS2C-734 > URL: https://issues.apache.org/jira/browse/AXIS2C-734 > Project: Axis2-C > Issue Type: New Feature > Reporter: Damitha Kumarage > > A service developer may be interested only in the debug messages he put in his service. He don't need all the debug messages from within the core/transport of the axis2c engine. Currently what happen is when the axis2c engine is started > with log enabled all the log messages core/transport are printed to the log file so that service developers log messages are obscured. > To avoid that I propose another log level called AXIS2_LOG_LEVEL_SERVICE. > When the axis2c engine is started with this log level only the critical and error logs are printed from the core/ trasport. > All the log messages written by the service developer with the logging function AXIS2_LOG_SERVICE( ) are also be printed. > Also If we start the axis2c engine with the log level debug, the messages written using AXIS2_LOG_SERVICE( ) are printed. If we start the axis2c engine with the log level critical or error only the error/critical log messages are printed. > The function that I have added to the log.c to implement this is > AXIS2_EXTERN void AXIS2_CALL > axutil_log_impl_log_service( > axutil_log_t * log, > const axis2_char_t * filename, > const int linenumber, > const axis2_char_t * format, > ...) > { > FILE *fd = NULL; > axutil_thread_mutex_t *mutex = NULL; > if (log && format) > { > if (!(fd = AXIS2_INTF_TO_IMPL(log)->stream)) > { > fprintf(stderr, "Stream is not found\n"); > } > if (!(mutex = AXIS2_INTF_TO_IMPL(log)->mutex)) > { > fprintf(stderr, "Log mutex is not found\n"); > } > if (AXIS2_LOG_LEVEL_DEBUG <= log->level) > { > char value[AXIS2_LEN_VALUE + 1]; > va_list ap; > va_start(ap, format); > AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap); > va_end(ap); > axutil_log_impl_write_to_file(log, mutex, AXIS2_LOG_LEVEL_DEBUG, > filename, linenumber, value); > } > } > else > fprintf(stderr, "please check your log and buffer"); > } > Also in the other log functions I have changed this line > if (AXIS2_LOG_LEVEL_DEBUG <= log->level) > to > if (AXIS2_LOG_LEVEL_DEBUG <= log->level && > log->level != AXIS2_LOG_LEVEL_SERVICE) -- 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: axis-c-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-dev-help@ws.apache.org