logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Deboy <scott.de...@gmail.com>
Subject Re: AW: Unable to shutdown SocketHubReceivers in Chainsaw
Date Tue, 17 Aug 2010 14:42:38 GMT
One more thing:  yes multiple clients can be connected at the same  
time to a sockethubappender.

Scott


On Aug 17, 2010, at 5:32 AM, "Stadelmann Josef" <josef.stadelmann@axa-winterthur.ch 
 > wrote:

>
> To overcome my problems seen
> I consolidated my log4j.properties files into one larger  
> log4j.properties file under the Tomcat/common/classes directory.
> IA64> cd  /DKB3/APACHE/JAKARTA/TOMCAT/COMMON/CLASSES
> IA64>type log4j.properties
> log4j.debug=true
> # -------------------------------------------------------------------
> # Copyright 2001-2004 The Apache Software Foundation.
> #
> # Licensed under the Apache License, Version 2.0 (the "License");
> # you may not use this file except in compliance with the License.
> # You may obtain a copy of the License at
> #
> #      http://www.apache.org/licenses/LICENSE-2.0
> #
> # Unless required by applicable law or agreed to in writing, software
> # distributed under the License is distributed on an "AS IS" BASIS,
> # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
> implied.
> # See the License for the specific language governing permissions and
> # limitations under the License.
> # -------------------------------------------------------------------
> log4j.rootLogger=INFO, CONSOLE, R, CHAINSAW_CLIENT, LOGFILE,  
> CHAINSAW_AXIS2
>
> # in absence of a true console - on OpenVMS the log goes into
> #  apache$specific:[000000]APACHE$JAKARTA_SERVER_OUTPUT.LOG;3
>
> # -------------------------------------------------------------------
> # CONSOLE is set to be a ConsoleAppender using a PatternLayout. -----
> log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
> log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
> log4j.appender.CONSOLE.layout.ConversionPattern=%d %-5p %c - %m%n
>
> # -------------------------------------------------------------------
> # R is a rolling file appender  --- not used yet / no need to parse
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.Append=true
> log4j.appender.R.File=${catalina.home}logs/tomcat.log
> log4j.appender.R.MaxFileSize=2MB
> log4j.appender.R.MaxBackupIndex=10
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
>
> # -------------------------------------------------------------------
> # CHAINSAW_CLIENT is an appender sending to a remote host GUI -------
> #  feeding the CHAINSAW client listening on TCP/IP port 4445
> log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketHubAppender
> log4j.appender.CHAINSAW_CLIENT.Port=4449
> log4j.appender.CHAINSAW_CLIENT.LocationInfo=true
>
> # -------------------------------------------------------------------
> # LOGFILE is set to be a File appender using a PatternLayout. -------
> log4j.appender.LOGFILE=org.apache.log4j.FileAppender
> log4j.appender.LOGFILE.File=/axcls/axis2_SpServer.log
> log4j.appender.LOGFILE.Append=true
> log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
> log4j.appender.LOGFILE.layout.ConversionPattern=%-5p - %m%n
>
> #log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x  
> - %m%n
> #log4j.appender.LOGFILE.layout=org.apache.log4j.xml.XMLLayout
>
> # -------------------------------------------------------------------
> # CHAINSAW_AXIS2 is an appender sending to a remote host GUI -------
> #  feeding the CHAINSAW client listening on TCP/IP port 4445
> log4j.appender.CHAINSAW_AXIS2=org.apache.log4j.net.SocketHubAppender
> log4j.appender.CHAINSAW_AXIS2.Port=4450
> log4j.appender.CHAINSAW_AXIS2.LocationInfo=true
>
> # -------------------------------------------------------------------
> #- Set your loggers priority to what you need -----------------------
> #     Logger logging             WHAT it logs   WHO is actually  
> logging
> log4j.logger.org.apache.catalina=INFO,          CONSOLE, R,  
> CHAINSAW_CLIENT
> log4j.logger.org.apache.coyote=INFO, CONSOLE, R, CHAINSAW_CLIENT
> log4j.logger.org.apache.jasper=INFO,            CONSOLE, R,  
> CHAINSAW_CLIENT
> log4j.logger.org.apache.jk=INFO,                CONSOLE, R,  
> CHAINSAW_CLIENT
> log4j.logger.org.apache.tomcat=INFO, CONSOLE, R, CHAINSAW_CLIENT
> log4j.logger.org.apache.commons=INFO,           CONSOLE, R,  
> CHAINSAW_CLIENT
> log4j.logger.org.apache.axiom=WARN,            CONSOLE, R,  
> CHAINSAW_CLIENT
> log4j.logger.org.apache.axis2=INFO,             CONSOLE, R,  
> CHAINSAW_CLIENT
> log4j.logger.org.apache.axis2.deployment=DEBUG, CONSOLE, R,  
> CHAINSAW_CLIENT
> log4j.logger.de.hunsicker.jalopy.io=FATAL,      CONSOLE, R,  
> CHAINSAW_CLIENT
> log4j.logger.httpclient.wire.header=FATAL,      CONSOLE, R,  
> CHAINSAW_CLIENT
> log4j.logger.axawl.spezpla.servers.SpezplaService.SpServer=DEBUG,  
> LOGFILE, CHAINSAW_AXIS2
>
>
> # -------------------------------------------------------------------
> # define the additivities used to prevent logging twice the same msg
> # NOTE: each logger needs an additivity set or you risk logging twice
> #
> log4j.additivity.org.apache.axiom=false
> log4j.additivity.org.apache.axis2=false
> log4j.additivity.org.apache.axis2.deployment=false
> log4j.additivity.org.apache.catalina=false
> log4j.additivity.org.apache.coyote=false
> log4j.additivity.org.apache.jasper=false
> log4j.additivity.org.apache.jk=false
> log4j.additivity.org.apache.commons=false
> log4j.additivity.axawl.spezpla.servers.SpezplaService.SpServer=false
> IA64>
>
> Then I modified my code: the idea behind the change is...
> Once a chainsaw SocketHubAppender is established with a Port,
> either in a log4j.properties file or through code
> on cannot create another chainsaw SocketHubAppender with the same  
> Port,
> not in a other log4j.properties file and not in code,
> unless one likes to see an exception stating that the port is  
> already in use.
>
> So I changed my code
> FROM:
>            // for CHAINSAW Logging - get the configured appender
>            SocketHubAppender sapp = (SocketHubAppender) 
> this.clog.getAppender("CHAINSAW_AXIS2");
>            if (sapp != null) {
>                // create a new session appender of type  
> SocketHubAppender
>                this.ssapp = new SocketHubAppender(sapp.getPort());
>                this.ssapp.setLocationInfo(sapp.getLocationInfo());
>                ssapp.activateOptions();
>                this.slog.addAppender( this.ssapp);
>            }
> TO
>            // for CHAINSAW Logging - get the configured appender and  
> re-use it for a second logger
>            SocketHubAppender sapp = (SocketHubAppender) 
> this.clog.getAppender("CHAINSAW_AXIS2");
>            if (sapp != null) {
>                this.slog.addAppender( this.sapp);
>            }
>
>
> Josef
>
>
>
>
>
>
>
> -----Urspr√ľngliche Nachricht-----
> Von: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch]
> Gesendet: Dienstag, 17. August 2010 09:47
> An: Log4J Users List
> Betreff: AW: Unable to shutdown SocketHubReceivers in Chainsaw
>
> Scott see my comment ++>
>
> -----Urspr√ľngliche Nachricht-----
> Von: Scott Deboy [mailto:scott.deboy@gmail.com]
> Gesendet: Dienstag, 17. August 2010 07:59
> An: Log4J Users List
> Betreff: Re: Unable to shutdown SocketHubReceivers in Chainsaw
>
> It appears you are loading a new log4j configuration inside the same  
> VM.
>
> ++> Scott you're absolute correct with your observation.
>
>
> These lines in your log are due to a call to appender.close, which  
> is called
> by removeAllAppenders, possibly due to PropertyConfigurator parsing  
> the
> AXIS2 log4j.properties config file.
>
> log4j: closing SocketHubAppender CHAINSAW_CLIENT
> log4j: stopping ServerSocket
> log4j: server monitor thread shutting down
> log4j: server monitor thread shut down
> log4j: closing client connections
> log4j: SocketHubAppender CHAINSAW_CLIENT closed
>
> Can you use a single log4j.properties file which combines all entries
> (including SocketHubAppender) into one config file which is read on  
> Tomcat
> startup?  That may resolve your issue..
>
>
> ++> maybe - I can make a single log4j.properties file,
>    but what about reading this log4j.properties file in code to  
> construct very
>    specific loggers and appenders with some params configured
>
>    My service objects init() method is... and the accident happens  
> when it comes to
>    PropertyConfigurator.configureAndWatch();  What I attempt to do  
> is, to have a
>    configurable logger and appender but then use in a code a session  
> specific
>    logger and appender to keep the logs for each user session  
> separate. If you have
>    a much better way to do it I am ready to follow.
>    and not to forget .... it works perfect with SocketAppender and  
> SocketReceiver
>    and I only have to use SocketHubAppender and SocketHubReceiver  
> due to hangups
>    of tomcat and my web service if a Chainsaw is not running when  
> they sart.
>
>    Also, in Chainsaw I like to see the user-sessions-loggers ....
>
>    BTW: if I have a SocketHubAppender is it correct that at the same  
> time
>      Many Chainsaw application on different PC's can connect and get  
> the log
>      Events?
>
>
> public class SpServer {
>
>    private static Logger rlog = Logger.getRootLogger();  // shared  
> among ....
>
>    //never use static if variable shall become an instance of ...  
> and not be shared among ...
>    private Logger clog = null;              // keeps the configured- 
> logger
>    private Logger slog = null;              // keeps the session- 
> logger
>    private Logger log  = null;              // keeps the local copy  
> of the session-logger
>    private String NameOfLogger = null;      // keeps the session  
> oriented NameOfLogger
>    private FileAppender sfapp = null;       // keeps the session  
> file appender simply for close()
>    private SocketHubAppender ssapp = null;  // the socket appender  
> to send log events to Chanisaw
>
>    // keeps the instance of a WSIT Java Bean used to communicate  
> with our Spezpla server
>    private SPgImpl SPg = null;
>
>    private int i = -1;                         // -1
>    private Integer intObj = new Integer(i);    // -1
>
>    // get the instance date-time (get time-stamp when this web- 
> service is born)
>    // get the time/date when the object of class SpServer is created
>    private String oDate = new Date().toString();
>
>    private ServiceContext sc = null;
>    private OperationContext oc = null;
>
>    // if we work in scope="soapsession" for long lasting sessions  
> then we need a
>    // init() and a destroy() method ...
>
>    public void init(ServiceContext sCtx) throws XMLStreamException,  
> WsiException {
>
>        // sCtx = Service Context is the ident for the session instance
>        this.sc = sCtx;
>
>        try {
>
>            String scID = SpServer.class.getName().toString();
>            //String[] a1 = scID.split("."); does not work with "."  
> as separator
>            String[] a1 = {"axawl", "spezpla", "servers",  
> "SpezplaService", "SpServer"};
>            String lcID = this.sc.getLogCorrelationIDString();
>            String[] a2 = lcID.split(":");
>
>            PropertyConfigurator.configureAndWatch( "/axcls/ 
> log4j.properties", 60*1000 );
>            // get the configured logger (known name)
>            // the configured logger has
>            //   an appender of some type which knows a logfile
>            //   a layout, a pattern
>            this.NameOfLogger = SpServer.class.getName();
>            this.clog = Logger.getLogger(this.NameOfLogger);
>
>            // create the session logger
>            this.slog = Logger.getLogger(this.NameOfLogger.concat 
> ("@").concat(a2[2]));
>            this.slog.setLevel(this.clog.getLevel());
>            this.slog.setAdditivity(this.clog.getAdditivity());
>
>            // get the configured appender
>            FileAppender cfapp = (FileAppender)this.clog.getAppender 
> ("LOGFILE");
>            if (cfapp != null) {
>                String clogFileName = cfapp.getFile 
> ();                                   // get the filename
>                int substringindex = clogFileName.indexOf 
> (".log");                       // index to ".log""
>                String sCxLogFileName = clogFileName.substring 
> (0,substringindex-1);      // extract configured prefix
>                sCxLogFileName = sCxLogFileName.concat("_").concat(a2 
> [2]).concat(".log");   // make session logfilename
>                // create a new session appender of type FileAppender
>                this.sfapp = new FileAppender( cfapp.getLayout(),  
> sCxLogFileName, cfapp.getAppend() );
>                sfapp.activateOptions();
>                // finally add the session-appender to the session- 
> logger
>                this.slog.addAppender( this.sfapp );
>            }
>
>
>            // for CHAINSAW Logging
>            SocketHubAppender sapp = (SocketHubAppender) 
> this.clog.getAppender("CHAINSAW_AXIS2");
>            if (sapp != null) {
>                // create a new session appender of type  
> SocketHubAppender
>                //this.ssapp = new SocketAppender(sapp.getRemoteHost 
> (),sapp.getPort());
>                this.ssapp = new SocketHubAppender(sapp.getPort());
>                this.ssapp.setLocationInfo(sapp.getLocationInfo());
>                ssapp.activateOptions();
>                this.slog.addAppender( this.ssapp);
>            }
>
>            // for later in other methods we need
>            this.log = this.slog;
>
>            // take a local copy to be used in this method only
>            Logger log = this.slog;   // create a local copy
>
>            String sDate = new Date().toString();
>
>
>            log.info(" init()    called at : "+ sDate + " using "+  
> this.sc.toString()+" i="+intObj.toString(i+=1));
>            log.info("   
> ---------------------------------------------------");
>            log.info("  Logger is of type  : "+ Logger.class.toString 
> ());
>            log.info("  Logger is instance : "+ log.toString());
>            log.info("  Logger is named    : "+ log.getName());
>            log.info("  Logger is at level : "+ log.getLevel());
>            log.info("   
> ---------------------------------------------------");
>        .....
>
> So far my code. <++
>
>
> Scott
>
> On Mon, Aug 16, 2010 at 11:06 AM, Stadelmann Josef <
> josef.stadelmann@axa-winterthur.ch> wrote:
>
>> Hi Scott
>>
>> Using latest Chainsaw (you made the fix for removeing loggers from  
>> the
>> logger pane),
>> I have setup to SocketHubAppenders and 2 SocketHubReceivers
>>
>> The first pair SocktHubAppender is connected with the logs from
>> org.apache.* and shall log all log events from org.apache.Tomcat e  
>> all
>> It connects well to Port 4447 from my PC running chainsaw to my  
>> server
>> running tomcat e all.
>>
>> The second is more specific and shall log from my
>> axawl.spezpla.servers.SpezplaService.SpServer logger
>>
>> When Tomcat starts the first pair works OK, the SocketHubReceiver
>> connects (attempst to connect) on a 1 second interval and
>> It gets data from all the logers spread within apache jakarta  
>> tomcat e
>> all.
>> (It's very usefull to learn about loggers in Tomcat Catalina Jk ...  
>> do
>> it using chainsaw)
>>
>>
>> The second pair does not work at all.
>> I can see in the chainsaw status line "Connection received from
>> Integ1:4448"
>> But then I can also see in the chainsaw-log "Remote host refused
>> Connection"
>> But no log output is generated into Chainsaw, no taged pane for the
>> messages of the second receiver is created.
>>
>>
>> All is OK down to the bolded Line when the confirmation comes that  
>> the
>> tomcat server has been starting up.
>>
>> After that line I start my axis2 client. And by doing so, the axis2  
>> web
>> service SpServer object, catches infomrmation from a log4j.properties
>> file in the axis2 class directory.
>>
>> This properties and the code work well if I use SocketAppender and
>> SocketReceivers.
>>
>> But see what happens when I use SocketHubAppender's and Receivers and
>> what to create a port 4448 for the web service SocketHubAppender
>>
>> The first red line bothers me as it closes the Chainsaw_client and  
>> hence
>> I do not see any more logging from tomcat e all.
>> It happens at the time the axis2 log4j.properties is read by my web
>> service SpServer objetc.
>>
>> The second red line shows that correctly Chainsaw_axis2 is configured
>> with ist unique port 4448
>>
>> However later on I get errors raised and dont know why, and no log
>> events are sent using the chainsaw_axis2 client.
>>
>> Any advise is very welcome
>>
>> Josef
>>
>>
>> IA64>ty APACHE$JAKARTA_SERVER_OUTPUT.LOG
>> $ Set NoOn
>> $ VERIFY = F$VERIFY(F$TRNLNM("SYLOGIN_VERIFY"))
>> Using CATALINA_BASE  : /disk$oracle2/apache/jakarta/tomcat/
>> Using CATALINA_HOME  : /disk$oracle2/apache/jakarta/tomcat/
>> Using CATALINA_TMPDIR: /disk$oracle2/apache/jakarta/tomcat/temp
>> APACHE$ROOT:[000000]
>> =   APACHE$SPECIFIC:[000000]
>> =   APACHE$COMMON:[000000]
>> P1 = "RUN"
>> P2 = ""
>> P3 = ""
>> P4 = ""
>> P5 = ""
>> P6 = ""
>> P7 = ""
>> P8 = ""
>> java_vms_base =  INTEG1$DKB3:[000000.JAVA$150.
>> JAVA_HOME = /INTEG1$DKB3/000000/JAVA$150
>> SYSTEM_CLASSPATH = INTEG1$DKB3:[000000.JAVA$150.LIB]TOOLS.JAR
>> Using Java 1.5.0 setup --  $ @sys$manager:java$150_setup
>> Running Tomcat.....
>> 0: integ1$dkb3:[000000.java$150.bin]java$java.exe;1
>> 1: -Xms64m
>> 2: -Xmx1024m
>> 3: -Xdynclassgc
>> 4: -Xint
>> 5: -Djava.compiler=NONE
>> 6:
>> -Djava.util.logging.config.file=/catalina_home/common/classes/ 
>> commons-lo
>> gging.properties
>> 7:
>> -Djava.endorsed.dirs=/disk$oracle2/apache/jakarta/tomcat/common/ 
>> endorsed
>> 8: -Dcatalina.base=/disk$oracle2/apache/jakarta/tomcat/
>> 9: -Dcatalina.home=/disk$oracle2/apache/jakarta/tomcat/
>> 10: -Dcatalina.tmpdir=/disk$oracle2/apache/jakarta/tomcat/temp
>> 11: org.apache.catalina.startup.Bootstrap
>> 12: start
>> log4j: Parsing for [root] with value=[INFO, CONSOLE, R,
>> CHAINSAW_CLIENT].
>> log4j: Level token is [INFO].
>> log4j: Category root set to INFO
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Parsing layout options for "CONSOLE".
>> log4j: Setting property [conversionPattern] to [%d %-5p %c - %m%n].
>> log4j: End of parsing for "CONSOLE".
>> log4j: Parsed "CONSOLE" options.
>> log4j: Parsing appender named "R".
>> log4j: Parsing layout options for "R".
>> log4j: Setting property [conversionPattern] to [%p %t %c - %m%n ].
>> log4j: End of parsing for "R".
>> log4j: Setting property [append] to [true].
>> log4j: Setting property [file] to
>> [/disk$oracle2/apache/jakarta/tomcat/logs/tomcat.log].
>> log4j: Setting property [maxBackupIndex] to [10].
>> log4j: Setting property [maxFileSize] to [2MB ].
>> log4j: setFile called:
>> /disk$oracle2/apache/jakarta/tomcat/logs/tomcat.log, true
>> log4j: setFile ended
>> log4j: Parsed "R" options.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Setting property [port] to [4447].
>> log4j: Setting property [locationInfo] to [true].
>> log4j: Parsed "CHAINSAW_CLIENT" options.
>> log4j: Parsing for [org.apache.tomcat] with value=[INFO,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [INFO].
>> log4j: Category org.apache.tomcat set to INFO
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.org.apache.tomcat=[null]
>> log4j: Parsing for [org.apache.jasper] with value=[INFO,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [INFO].
>> log4j: Category org.apache.jasper set to INFO
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.org.apache.jasper=[false]
>> log4j: Setting additivity for "org.apache.jasper" to false
>> log4j: Parsing for [org.apache.axis2] with value=[INFO,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [INFO].
>> log4j: Category org.apache.axis2 set to INFO
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.org.apache.axis2=[false]
>> log4j: Setting additivity for "org.apache.axis2" to false
>> log4j: Parsing for [org.apache.jk] with value=[INFO,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [INFO].
>> log4j: Category org.apache.jk set to INFO
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.org.apache.jk=[false]
>> log4j: Setting additivity for "org.apache.jk" to false
>> log4j: Parsing for [org.apache.commons] with value=[INFO,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [INFO].
>> log4j: Category org.apache.commons set to INFO
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.org.apache.commons=[false]
>> log4j: Setting additivity for "org.apache.commons" to false
>> log4j: Parsing for [org.apache.catalina] with value=[INFO,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [INFO].
>> log4j: Category org.apache.catalina set to INFO
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.org.apache.catalina=[false]
>> log4j: Setting additivity for "org.apache.catalina" to false
>> log4j: Parsing for [org.apache.axiom] with value=[WARN,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [WARN].
>> log4j: Category org.apache.axiom set to WARN
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.org.apache.axiom=[false]
>> log4j: Setting additivity for "org.apache.axiom" to false
>> log4j: Parsing for [org.apache.coyote] with value=[INFO,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [INFO].
>> log4j: Category org.apache.coyote set to INFO
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.org.apache.coyote=[false]
>> log4j: Setting additivity for "org.apache.coyote" to false
>> log4j: Parsing for [de.hunsicker.jalopy.io] with value=[FATAL,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [FATAL].
>> log4j: Category de.hunsicker.jalopy.io set to FATAL
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.de.hunsicker.jalopy.io=[null]
>> log4j: Parsing for [httpclient.wire.header] with value=[FATAL,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [FATAL].
>> log4j: Category httpclient.wire.header set to FATAL
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.httpclient.wire.header=[null]
>> log4j: Parsing for [org.apache.axis2.deployment] with value=[DEBUG,
>> CONSOLE, R, CHAINSAW_CLIENT].
>> log4j: Level token is [DEBUG].
>> log4j: Category org.apache.axis2.deployment set to DEBUG
>> log4j: Parsing appender named "CONSOLE".
>> log4j: Appender "CONSOLE" was already parsed.
>> log4j: Parsing appender named "R".
>> log4j: Appender "R" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_CLIENT".
>> log4j: Appender "CHAINSAW_CLIENT" was already parsed.
>> log4j: Handling log4j.additivity.org.apache.axis2.deployment=[false]
>> log4j: Setting additivity for "org.apache.axis2.deployment" to false
>> log4j: Finished configuring.
>> log4j: accepting connection from C038020 (166.9.88.58)
>> 2010-08-16 19:44:26,130 INFO
>> org.apache.coyote.http11.Http11BaseProtocol - Initializing Coyote
>> HTTP/1.1 on http-8080
>> 2010-08-16 19:44:26,165 INFO  org.apache.catalina.startup.Catalina -
>> Initialization processed in 2344 ms
>> 2010-08-16 19:44:26,451 INFO   
>> org.apache.catalina.core.StandardService -
>> Starting service Catalina
>> 2010-08-16 19:44:26,468 INFO   
>> org.apache.catalina.core.StandardEngine -
>> Starting Servlet Engine: Apache Tomcat/5.5.26
>> 2010-08-16 19:44:26,494 INFO  org.apache.catalina.core.StandardHost -
>> XML validation disabled
>> 2010-08-16 19:44:28,801 INFO   
>> org.apache.catalina.startup.HostConfig -
>> Deploying web application archive axis2.war
>> 2010-08-16 19:44:30,132 DEBUG
>> org.apache.axis2.deployment.WarBasedAxisConfigurator - trying to load
>> axis2.xml from module: /WEB-INF/
>> conf/axis2.xml
>> 2010-08-16 19:44:31,421 DEBUG
>> org.apache.axis2.deployment.WarBasedAxisConfigurator - setting web
>> location string: /disk$oracle2/apac
>> he/jakarta/tomcat/webapps/axis2
>> 2010-08-16 19:44:36,646 INFO   
>> org.apache.axis2.deployment.util.Utils -
>> Created temporary file : /disk$oracle2/apache/jakarta/tomcat/
>> work/Catalina/localhost/axis2/ 
>> axis27702574906852539797addressing-1.2.mar
>> 2010-08-16 19:44:37,001 DEBUG
>> org.apache.axis2.deployment.DeploymentEngine - Adding new module
>> 2010-08-16 19:44:37,003 INFO   
>> org.apache.axis2.deployment.ModuleDeployer
>> - Deploying module: addressing-1.2
>> 2010-08-16 19:44:37,009 INFO   
>> org.apache.axis2.deployment.util.Utils -
>> Created temporary file : /disk$oracle2/apache/jakarta/tomcat/
>> work/Catalina/localhost/axis2/ 
>> axis21976225014924538546soapmonitor-1.2.ma
>> r
>> 2010-08-16 19:44:37,042 DEBUG
>> org.apache.axis2.deployment.DeploymentEngine - Adding new module
>> 2010-08-16 19:44:37,044 INFO   
>> org.apache.axis2.deployment.ModuleDeployer
>> - Deploying module: soapmonitor-1.2
>> 2010-08-16 19:44:37,209 DEBUG
>> org.apache.axis2.deployment.WarBasedAxisConfigurator - loaded  
>> repository
>> from /WEB-INF folder (unpacke
>> d war)
>> 2010-08-16 19:44:37,251 INFO   
>> org.apache.axis2.deployment.util.Utils -
>> Created temporary file : /disk$oracle2/apache/jakarta/tomcat/
>> work/Catalina/localhost/axis2/ 
>> axis28404908126186743684SpezplaService.aar
>> 2010-08-16 19:44:39,053 INFO
>> org.apache.axis2.deployment.ServiceDeployer - Deploying Web service:
>> SpezplaService.aar
>> 2010-08-16 19:44:39,062 INFO   
>> org.apache.axis2.deployment.util.Utils -
>> Created temporary file : /disk$oracle2/apache/jakarta/tomcat/
>> work/Catalina/localhost/axis2/axis23110359735019466597version.aar
>> 2010-08-16 19:44:39,102 INFO
>> org.apache.axis2.deployment.ServiceDeployer - Deploying Web service:
>> version.aar
>> 2010-08-16 19:44:39,125 DEBUG
>> org.apache.axis2.deployment.WarBasedAxisConfigurator - loaded  
>> services
>> from webapp
>> 2010-08-16 19:44:39,738 INFO
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ 
>> balancer
>> ] - org.apache.webapp.balancer
>> .BalancerFilter: init(): ruleChain:
>> [org.apache.webapp.balancer.RuleChain:
>> [org.apache.webapp.balancer.rules.URLStringMatchRule: Tar
>> get string: News / Redirect URL: http://www.cnn.com],
>> [org.apache.webapp.balancer.rules.RequestParameterRule: Target param
>> name: par
>> amName / Target param value: paramValue / Redirect URL:
>> http://www.yahoo.com],
>> [org.apache.webapp.balancer.rules.AcceptEverythingRul
>> e: Redirect URL: http://jakarta.apache.org]]
>> 2010-08-16 19:44:40,455 INFO
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jsp- 
>> exam
>> ples] - ContextListener: conte
>> xtInitialized()
>> 2010-08-16 19:44:40,456 INFO
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jsp- 
>> exam
>> ples] - SessionListener: conte
>> xtInitialized()
>> 2010-08-16 19:44:41,596 INFO
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ 
>> servlets
>> -examples] - ContextListener:
>> contextInitialized()
>> 2010-08-16 19:44:41,597 INFO
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ 
>> servlets
>> -examples] - SessionListener:
>> contextInitialized()
>> 2010-08-16 19:44:42,800 INFO
>> org.apache.coyote.http11.Http11BaseProtocol - Starting Coyote HTTP/ 
>> 1.1
>> on http-8080
>> 2010-08-16 19:44:43,328 INFO  org.apache.jk.common.ChannelSocket -  
>> JK:
>> ajp13 listening on /0.0.0.0:8009
>> 2010-08-16 19:44:43,338 INFO  org.apache.jk.server.JkMain - Jk  
>> running
>> ID=0 time=0/76  config=null
>> 2010-08-16 19:44:43,534 INFO
>> org.apache.catalina.storeconfig.StoreLoader - Find registry
>> server-registry.xml at classpath resource
>> 2010-08-16 19:44:43,758 INFO  org.apache.catalina.startup.Catalina -
>> Server startup in 17590 ms
>> log4j: Parsing for [root] with value=[DEBUG, LOGFILE,  
>> CHAINSAW_AXIS2].
>> log4j: Level token is [DEBUG].
>> log4j: Category root set to DEBUG
>> log4j: closing SocketHubAppender CHAINSAW_CLIENT
>> log4j: stopping ServerSocket
>> log4j: server monitor thread shutting down
>> log4j: server monitor thread shut down
>> log4j: closing client connections
>> log4j: SocketHubAppender CHAINSAW_CLIENT closed
>> log4j: Parsing appender named "LOGFILE".
>> log4j: Parsing layout options for "LOGFILE".
>> log4j: Setting property [conversionPattern] to [%-5p - %m%n].
>> log4j: End of parsing for "LOGFILE".
>> log4j: Setting property [append] to [true].
>> log4j: Setting property [file] to [/axcls/axis2_SpServer.log].
>> log4j: setFile called: /axcls/axis2_SpServer.log, true
>> log4j: setFile ended
>> log4j: Parsed "LOGFILE" options.
>> log4j: Parsing appender named "CHAINSAW_AXIS2".
>> log4j: Setting property [port] to [4448].
>> log4j: Setting property [locationInfo] to [true].
>> log4j: Parsed "CHAINSAW_AXIS2" options.
>> log4j: Parsing for [axawl.spezpla.servers.SpezplaService.SpServer]  
>> with
>> value=[DEBUG, LOGFILE, CHAINSAW_AXIS2].
>> log4j: Level token is [DEBUG].
>> log4j: Category axawl.spezpla.servers.SpezplaService.SpServer set to
>> DEBUG
>> log4j: Parsing appender named "LOGFILE".
>> log4j: Appender "LOGFILE" was already parsed.
>> log4j: Parsing appender named "CHAINSAW_AXIS2".
>> log4j: Appender "CHAINSAW_AXIS2" was already parsed.
>> log4j: Handling
>> log4j.additivity.axawl.spezpla.servers.SpezplaService.SpServer= 
>> [false]
>> log4j: Setting additivity for
>> "axawl.spezpla.servers.SpezplaService.SpServer" to false
>> log4j: Finished configuring.
>> log4j: setFile called:
>> /axcls/axis2_SpServe_92293DB793D4B5591E1281980699843.log, true
>> log4j: setFile ended
>> log4j: setFile called:
>> /axcls/axis2_SpServe_92293DB793D4B5591E1281980699843.log, true
>> log4j: setFile ended
>> log4j:ERROR exception setting timeout, shutting down server socket.
>> java.net.BindException: address already in use   (errno:48)
>>       at java.net.PlainSocketImpl.socketBind(Native Method)
>>       at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>>       at java.net.ServerSocket.bind(ServerSocket.java:319)
>>       at java.net.ServerSocket.<init>(ServerSocket.java:185)
>>       at java.net.ServerSocket.<init>(ServerSocket.java:97)
>> log4j:ERROR exception setting timeout, shutting down server socket.
>>       at
>> org.apache.log4j.net.SocketHubAppender.createServerSocket 
>> (SocketHubAppen
>> der.java:341)
>>       at
>> org.apache.log4j.net.SocketHubAppender$ServerMonitor.run 
>> (SocketHubAppend
>> er.java:409)
>>       at java.lang.Thread.run(Thread.java:595)
>> java.net.BindException: address already in use   (errno:48)
>>       at java.net.PlainSocketImpl.socketBind(Native Method)
>>       at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>>       at java.net.ServerSocket.bind(ServerSocket.java:319)
>>       at java.net.ServerSocket.<init>(ServerSocket.java:185)
>>       at java.net.ServerSocket.<init>(ServerSocket.java:97)
>>       at
>> org.apache.log4j.net.SocketHubAppender.createServerSocket 
>> (SocketHubAppen
>> der.java:341)
>>       at
>> org.apache.log4j.net.SocketHubAppender$ServerMonitor.run 
>> (SocketHubAppend
>> er.java:409)
>>       at java.lang.Thread.run(Thread.java:595)
>> log4j: accepting connection from C038020 (166.9.88.58)
>> log4j: closing SocketHubAppender null
>> log4j: stopping ServerSocket
>> log4j: closing client connections
>> log4j: SocketHubAppender null closed
>> IA64>
>>
>> This is my log4j.properties in the tomcat class directory, it manages
>> all the tomcat loggers evident and important for me
>>
>> IA64>ty log4j.properties
>> log4j.debug=true
>> # -------------------------------------------------------------------
>> # Copyright 2001-2004 The Apache Software Foundation.
>> #
>> # Licensed under the Apache License, Version 2.0 (the "License");
>> # you may not use this file except in compliance with the License.
>> # You may obtain a copy of the License at
>> #
>> #      http://www.apache.org/licenses/LICENSE-2.0
>> #
>> # Unless required by applicable law or agreed to in writing, software
>> # distributed under the License is distributed on an "AS IS" BASIS,
>> # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> # See the License for the specific language governing permissions and
>> # limitations under the License.
>> # -------------------------------------------------------------------
>> log4j.rootLogger=INFO, CONSOLE, R, CHAINSAW_CLIENT
>>
>> # in absence of a true console - the log goes into
>> #  apache$specific:[000000]APACHE$JAKARTA_SERVER_OUTPUT.LOG
>>
>> # -------------------------------------------------------------------
>> # CONSOLE is set to be a ConsoleAppender using a PatternLayout. -----
>> log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
>> log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
>> log4j.appender.CONSOLE.layout.ConversionPattern=%d %-5p %c - %m%n
>>
>> # -------------------------------------------------------------------
>> # R is a rolling file appender  --- not used yet / no need to parse
>> log4j.appender.R=org.apache.log4j.RollingFileAppender
>> log4j.appender.R.Append=true
>> log4j.appender.R.File=${catalina.home}logs/tomcat.log
>> log4j.appender.R.MaxFileSize=2MB
>> log4j.appender.R.MaxBackupIndex=10
>> log4j.appender.R.layout=org.apache.log4j.PatternLayout
>> log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
>>
>> # -------------------------------------------------------------------
>> # CHAINSAW_CLIENT is an appender sending to a remote host GUI -------
>> #  feeding the CHAINSAW client listening on TCP/IP port 4445
>> log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketHubAppender
>> log4j.appender.CHAINSAW_CLIENT.Port=4447
>> log4j.appender.CHAINSAW_CLIENT.LocationInfo=true
>>
>> # -------------------------------------------------------------------
>> #- Set your loggers priority to what you need -----------------------
>> #     Logger logging             WHAT it logs   WHO is actually  
>> logging
>> log4j.logger.org.apache.catalina=INFO,          CONSOLE, R,
>> CHAINSAW_CLIENT
>> log4j.logger.org.apache.coyote=INFO,            CONSOLE, R,
>> CHAINSAW_CLIENT
>> log4j.logger.org.apache.jasper=INFO,            CONSOLE, R,
>> CHAINSAW_CLIENT
>> log4j.logger.org.apache.jk=INFO,                CONSOLE, R,
>> CHAINSAW_CLIENT
>> log4j.logger.org.apache.tomcat=INFO,           CONSOLE, R,
>> CHAINSAW_CLIENT
>> log4j.logger.org.apache.commons=INFO,           CONSOLE, R,
>> CHAINSAW_CLIENT
>> log4j.logger.org.apache.axiom=WARN,            CONSOLE, R,
>> CHAINSAW_CLIENT
>> log4j.logger.org.apache.axis2=INFO, CONSOLE, R,
>> CHAINSAW_CLIENT
>> log4j.logger.org.apache.axis2.deployment=DEBUG, CONSOLE, R,
>> CHAINSAW_CLIENT
>> log4j.logger.de.hunsicker.jalopy.io=FATAL,      CONSOLE, R,
>> CHAINSAW_CLIENT
>> log4j.logger.httpclient.wire.header=FATAL,      CONSOLE, R,
>> CHAINSAW_CLIENT
>>
>> # -------------------------------------------------------------------
>> # define the additivities used to prevent logging twice the same msg
>> # NOTE: each logger needs an additivity set or you risk logging twice
>> #
>> log4j.additivity.org.apache.axiom=false
>> log4j.additivity.org.apache.axis2=false
>> log4j.additivity.org.apache.axis2.deployment=false
>> log4j.additivity.org.apache.catalina=false
>> log4j.additivity.org.apache.coyote=false
>> log4j.additivity.org.apache.jasper=false
>> log4j.additivity.org.apache.jk=false
>> log4j.additivity.org.apache.commons=false
>> IA64>
>>
>> And this is my log4j.properties in the axis2 class directory, read  
>> when
>> ever a axis2 client comes in or at 60 second intervalls.
>>
>> IA64>ty log4j.properties
>> log4j.debug=true
>> # -------------------------------------------------------------------
>> # Copyright 2001-2004 The Apache Software Foundation.
>> #
>> # Licensed under the Apache License, Version 2.0 (the "License");
>> # you may not use this file except in compliance with the License.
>> # You may obtain a copy of the License at
>> #
>> #      http://www.apache.org/licenses/LICENSE-2.0
>> #
>> # Unless required by applicable law or agreed to in writing, software
>> # distributed under the License is distributed on an "AS IS" BASIS,
>> # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> # See the License for the specific language governing permissions and
>> # limitations under the License.
>> # -------------------------------------------------------------------
>>
>> log4j.rootLogger=DEBUG, LOGFILE, CHAINSAW_AXIS2
>>
>> # -------------------------------------------------------------------
>> # CONSOLE is set to be a ConsoleAppender using a PatternLayout. -----
>> #log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
>> #log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
>> #log4j.appender.CONSOLE.layout.ConversionPattern=%d %-5p %c - %m%n
>>
>> # -------------------------------------------------------------------
>> # LOGFILE is set to be a File appender using a PatternLayout. -------
>> log4j.appender.LOGFILE=org.apache.log4j.FileAppender
>> log4j.appender.LOGFILE.File=/axcls/axis2_SpServer.log
>> log4j.appender.LOGFILE.Append=true
>> log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
>> log4j.appender.LOGFILE.layout.ConversionPattern=%-5p - %m%n
>>
>> # -------------------------------------------------------------------
>> # CHAINSAW_CLIENT is an appender sending to a remote host GUI -------
>> #  feeding the CHAINSAW client listening on TCP/IP port 4445
>> log4j.appender.CHAINSAW_AXIS2=org.apache.log4j.net.SocketHubAppender
>> log4j.appender.CHAINSAW_AXIS2.Port=4448
>> log4j.appender.CHAINSAW_AXIS2.LocationInfo=true
>>
>> # -------------------------------------------------------------------
>> #- create the SpServer Logger ---------------------------------------
>> # this is the CONFIGURED logger for the SpServer.java JavaPart
>> # the Configurator strips of the logger_prefix "log4j.logger."
>> #  the logger is then known in the hierarchy as
>> #   "axawl.spezpla.servers.SpezplaService.SpServer"
>> #    retrive this configured logger from log4j.hierarchy through
>> #     Logger log = Logger.getLogger(SpServer.class);
>> log4j.logger.axawl.spezpla.servers.SpezplaService.SpServer=DEBUG,
>> LOGFILE, CHAINSAW_AXIS2
>>
>> # to prevent that logging events are propagated to parent loggers
>> # and finally arrive at the root loggers appender, printed to the  
>> root-
>> # loggers files i.e. additivity must be set to false to prevent this.
>> # please goto http://logging.apache.org/log4j/1.2/manual.html and  
>> read
>> # the short manual or buy the full manual
>> log4j.additivity.axawl.spezpla.servers.SpezplaService.SpServer=false
>> IA64>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>

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


Mime
View raw message