I tried the above options but doesnt seem to be woring. from the following link, i want to kno how do you couple your logger with the specific appender. https://wso2.org/repos/wso2/trunk/wsas/java/modules/core/conf/log4j.properties i.e. if i want to log a stuff in one projkect to a log file then i log4j.properties file i need to couple the logger of that project to the specific appender. how do u do that?
On Jan 19, 2008 11:52 AM, Afkham Azeez <[EMAIL PROTECTED]> wrote: > It has to be either at the top of your classpath or you have to point the > System property log4j.configuration to your log4j.properties file. Since > you are using Tomcat, you may set the CATALINA_OPTS system variable. i.e. > > On Linux, export CATALINA_OPTS=/home/azeez/log4j.configuration > On Windows, CATALINA_OPTS=C:\azeez\log4j.configuration > > and then start Tomcat, > > $./catalina.sh run > > Azeez > > > > On Jan 19, 2008 10:48 PM, Sushil Dodake <[EMAIL PROTECTED]> wrote: > > > i m suppose to put the log4j.proprties file in classes or conf > > folder.....? > > > > regards > > > > sushil > > > > On Jan 19, 2008 10:24 AM, Afkham Azeez <[EMAIL PROTECTED]> wrote: > > > > > Still you can have a single log4j configuration file which handles the > > > logging configuration of all Web services. For each of the services, you > > > can > > > use a different logger, these 6 loggers can write to 6 different files. > > > You > > > will need 6 different file appenders and each of these will point to a > > > separate log file. The 6 loggers will use one each of these appenders. > > > Here > > > is a sample file from WSAS ( > > > https://wso2.org/repos/wso2/trunk/wsas/java/modules/core/conf/log4j.properties). > > > Here we have used 2 different log files which are associated with 2 > > > different appenders. Take a look at how the loggers & appenders have been > > > configured. > > > > > > Azeez > > > > > > > > > On Jan 19, 2008 9:39 PM, Sushil Dodake <[EMAIL PROTECTED]> > > > wrote: > > > > > > > Azeez, > > > > my problem is my application has 6 web services and i need to have > > > > the loggs of each web service in diffrent log file. > > > > currently in development box they all are deployed in a singel > > > > tomcat. > > > > also the problem is on console the DEBUG does not appear... while if > > > > i make it to INFO then that appears.... but loggs cannot be directed in > > > > a > > > > .log file.... > > > > any help on this? > > > > > > > > regards, > > > > > > > > sushil > > > > > > > > On Jan 19, 2008 9:45 AM, Afkham Azeez <[EMAIL PROTECTED]> wrote: > > > > > > > > > Most probably the reason for this is that the system is picking up > > > > > another log4j.properties file. Hence your changes are not taking > > > > > effect. You should set the log4j.configuration system property to > > > > > point to your file using one of the following methods: > > > > > 1. in code, System.setProperty("log4j.configuration", > > > > > "C:\\axis2\\con\\log4j.properties"); > > > > > 2. -Dlog4j.configuration=C:\axis2\conf\log4j.properties in the bat > > > > > or sh file > > > > > > > > > > HTH > > > > > Azeez > > > > > > > > > > > > > > > On Jan 19, 2008 12:50 AM, Sushil Dodake <[EMAIL PROTECTED]> > > > > > wrote: > > > > > > > > > > > HI all i am using AXIS2 1.3 i am trying to enable logging in to > > > > > > a log file .... > > > > > > my probems are > > > > > > 1. the log file is not created on machine even i set optins in > > > > > > the LOG4j.properties > > > > > > 2. Only INFO messeges are logged on console... DEBUG messges > > > > > > dont appear. > > > > > > i dont get what is the problem, my log4j.properties file looks > > > > > > as below. > > > > > > even if i put a fully qualified path name for the > > > > > > log4j.appender.LOGFILE.File attribute as > > > > > > log4j.appender.LOGFILE.File=C:\logs\axis2.log it didnt work > > > > > > can sombody help me. > > > > > > > > > > > > # Set root category priority to INFO and its only appender to > > > > > > CONSOLE. > > > > > > > > > > > > log4j.rootCategory=DEBUG, CONSOLE, LOGFILE > > > > > > > > > > > > #log4j.rootCategory=INFO, CONSOLE, LOGFILE > > > > > > > > > > > > # Set the enterprise logger priority to FATAL > > > > > > > > > > > > log4j.logger.org.apache.axis2.enterprise=FATAL > > > > > > > > > > > > log4j.logger.de.hunsicker.jalopy.io=FATAL > > > > > > > > > > > > log4j.logger.httpclient.wire.header=FATAL > > > > > > > > > > > > log4j.logger.org.apache.commons.httpclient=FATAL > > > > > > > > > > > > # 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=axis2.log > > > > > > > > > > > > log4j.appender.LOGFILE.Append=true > > > > > > > > > > > > log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout > > > > > > > > > > > > log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c > > > > > > %x - %m%n > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Thanks > > > > > Afkham Azeez > > > > > > > > > > http://www.wso2.org > > > > > GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E > > > > > 0760 > > > > > > > > > > > > > > > > > > > > > -- > > > Thanks > > > Afkham Azeez > > > > > > http://www.wso2.org > > > GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760 > > > > > > > > > > -- > Thanks > Afkham Azeez > > http://www.wso2.org > GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760 >
