You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ashish Kulkarni <as...@gmail.com> on 2007/08/02 17:52:39 UTC

how to configure axis 1.4 loggingusing log4j

Hi
I am using log4j for logging in my application, i have recently added
webservice using axis 1.4 to my application,
now i am
getting lots of axis logs in the log file, how do i suppress those
logs, or contral what to log and what not to log,
my log4j is configured using properties file and is as below



log4j.rootLogger=, A1, A2

# A1 is set to be ConsoleAppender sending its output to System.out
log4j.appender.A1=org.apache.log4j.ConsoleAppender


# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout

# The conversion pattern consists of date in ISO8601 format, level,
# thread name, logger name truncated to its rightmost two components
# and left justified to 17 characters, location information consisting
# of file name (padded to 13 characters) and line number, nested
# diagnostic context, the and the application supplied message

log4j.appender.A1.layout.ConversionPattern=%d %-5p [%t] %-17c{2} (%13F:%L)
%3x - %m%n

# Appender A2 writes to the file "log".
log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
# use ${} to specify location
log4j.appender.A2.File=${java.io.tmpdir}approvals6000F3.txt

# Truncate 'test' if it aleady exists.
log4j.appender.A2.Append=false
log4j.appender.A2.DatePattern='.'yyyy-MM-dd

# Appender A2 uses the PatternLayout.
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%-5r %-5p [%t] %c{2} - %m%n



Ashish

Re: how to configure axis 1.4 loggingusing log4j

Posted by Anil Philip <go...@yahoo.com>.
I had the same problem.

The solution was to create a log4j.properties file.
And put it in C:\Program Files\Apache Software
Foundation\Tomcat 5.5\webapps\axis\WEB-INF\classes
 

# Set root category priority to INFO and its only
appender to CONSOLE.

log4j.rootCategory=INFO, CONSOLE

#log4j.rootCategory=INFO, CONSOLE, LOGFILE

 

# Set the enterprise logger category to FATAL and its
only appender to CONSOLE.

log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE

log4j.logger.org.apache.axis=FATAL, CONSOLE

 

# CONSOLE is set to be a ConsoleAppender using a
PatternLayout.

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender

log4j.appender.CONSOLE.Threshold=INFO

log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout

log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n

 

# LOGFILE is set to be a File appender using a
PatternLayout.

log4j.appender.LOGFILE=org.apache.log4j.FileAppender

log4j.appender.LOGFILE.File=axis.log

log4j.appender.LOGFILE.Append=true

log4j.appender.LOGFILE.Threshold=INFO

log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout

log4j.appender.LOGFILE.layout.ConversionPattern=%-4r
[%t] %-5p %c %x - %m%n

 

thanks,

Anil

--- Ashish Kulkarni <as...@gmail.com>
wrote:

> Hi
> I am using log4j for logging in my application, i
> have recently added
> webservice using axis 1.4 to my application,
> now i am
> getting lots of axis logs in the log file, how do i
> suppress those
> logs, or contral what to log and what not to log,
> my log4j is configured using properties file and is
> as below
> 
> 
> 
> log4j.rootLogger=, A1, A2
> 
> # A1 is set to be ConsoleAppender sending its output
> to System.out
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
> 
> 
> # A1 uses PatternLayout.
>
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> 
> # The conversion pattern consists of date in ISO8601
> format, level,
> # thread name, logger name truncated to its
> rightmost two components
> # and left justified to 17 characters, location
> information consisting
> # of file name (padded to 13 characters) and line
> number, nested
> # diagnostic context, the and the application
> supplied message
> 
> log4j.appender.A1.layout.ConversionPattern=%d %-5p
> [%t] %-17c{2} (%13F:%L)
> %3x - %m%n
> 
> # Appender A2 writes to the file "log".
>
log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
> # use ${} to specify location
>
log4j.appender.A2.File=${java.io.tmpdir}approvals6000F3.txt
> 
> # Truncate 'test' if it aleady exists.
> log4j.appender.A2.Append=false
> log4j.appender.A2.DatePattern='.'yyyy-MM-dd
> 
> # Appender A2 uses the PatternLayout.
>
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
> log4j.appender.A2.layout.ConversionPattern=%-5r %-5p
> [%t] %c{2} - %m%n
> 
> 
> 
> Ashish
> 



       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org