You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Hearty <he...@gmail.com> on 2008/11/07 11:45:29 UTC

log4j fails even after specify the location as jvm environment variable

In apache geronimo
I have tried the below 2 options of setting my fp-log4j.properties.
Both these options fails. I am not able to see log files created.

SET
JAVA_OPTS=-Dlog4j.configuration=C:\WebSphere\AppServerCommunityEdition\var\log\fp-log4j.properties

SET
JAVA_OPTS=-Dorg.apache.geronimo.log4jservice.configuration=C:\WebSphere\AppServerCommunityEdition\var\log\fp-log4j.properties

These envionment variable I've specified from a command prompt and I've run
start-server command from the same instance.

My fp-log4j.properties is as follows

#attach an appender to the base apacheds package logger:
log4j.logger.org.apache.directory=INFO,fp
#do not log apacheds to geronimo logs:
log4j.additivity.org.apache.directory=false


#Configure the fp specific appender:
log4j.appender.fp=org.apache.log4j.DailyRollingFileAppender
log4j.appender.fp.layout=org.apache.log4j.PatternLayout
# geronimo style logging
log4j.appender.fp.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n

log4j.appender.fp.append=true
log4j.appender.fp.file=${org.apache.geronimo.server.dir}/var/log/fp.log
log4j.appender.fp.bufferedIO=false


#focal point specific log settings
log4j.logger.com.telelogic.focalpoint=DEBUG
log4j.logger.com.telelogic.focalpoint.dao.jdbc.Jdbc=OFF
log4j.logger.com.telelogic.focalpoint.dao.ViewExecutor=OFF
log4j.logger.org.apache.catalina=INFO      
log4j.logger.org.springframework=INFO
log4j.logger.net.sf.ehcache.distribution=INFO

Please advice me where I went wrong
-- 
View this message in context: http://www.nabble.com/log4j-fails-even-after-specify-the-location-as-jvm-environment-variable-tp20378255p20378255.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


Re: log4j fails even after specify the location as jvm environment variable

Posted by Jacob Kjome <ho...@visi.com>.
Try....

SET 
JAVA_OPTS=-Dlog4j.configuration=file:/C:/WebSphere/AppServerCommunityEdition/var/log/fp-log4j.properties

It has to be a valid URL path, not a native system path.

Jake

On Fri, 7 Nov 2008 02:45:29 -0800 (PST)
  Hearty <he...@gmail.com> wrote:
> 
> In apache geronimo
> I have tried the below 2 options of setting my fp-log4j.properties.
> Both these options fails. I am not able to see log files created.
> 
> SET
> JAVA_OPTS=-Dlog4j.configuration=C:\WebSphere\AppServerCommunityEdition\var\log\fp-log4j.properties
> 
> SET
> JAVA_OPTS=-Dorg.apache.geronimo.log4jservice.configuration=C:\WebSphere\AppServerCommunityEdition\var\log\fp-log4j.properties
> 
> These envionment variable I've specified from a command prompt and I've run
> start-server command from the same instance.
> 
> My fp-log4j.properties is as follows
> 
> #attach an appender to the base apacheds package logger:
> log4j.logger.org.apache.directory=INFO,fp
> #do not log apacheds to geronimo logs:
> log4j.additivity.org.apache.directory=false
> 
> 
> #Configure the fp specific appender:
> log4j.appender.fp=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.fp.layout=org.apache.log4j.PatternLayout
> # geronimo style logging
> log4j.appender.fp.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
> 
> log4j.appender.fp.append=true
> log4j.appender.fp.file=${org.apache.geronimo.server.dir}/var/log/fp.log
> log4j.appender.fp.bufferedIO=false
> 
> 
> #focal point specific log settings
> log4j.logger.com.telelogic.focalpoint=DEBUG
> log4j.logger.com.telelogic.focalpoint.dao.jdbc.Jdbc=OFF
> log4j.logger.com.telelogic.focalpoint.dao.ViewExecutor=OFF
> log4j.logger.org.apache.catalina=INFO      
> log4j.logger.org.springframework=INFO
> log4j.logger.net.sf.ehcache.distribution=INFO
> 
> Please advice me where I went wrong
> -- 
> View this message in context: 
>http://www.nabble.com/log4j-fails-even-after-specify-the-location-as-jvm-environment-variable-tp20378255p20378255.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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


Re: log4j fails even after specify the location as jvm environment variable

Posted by Curt Arnold <ca...@apache.org>.
On Nov 7, 2008, at 4:45 AM, Hearty wrote:

>
> In apache geronimo
> I have tried the below 2 options of setting my fp-log4j.properties.
> Both these options fails. I am not able to see log files created.
>
> SET
> JAVA_OPTS=-Dlog4j.configuration=C:\WebSphere 
> \AppServerCommunityEdition\var\log\fp-log4j.properties
>
> SET
> JAVA_OPTS=-Dorg.apache.geronimo.log4jservice.configuration=C: 
> \WebSphere\AppServerCommunityEdition\var\log\fp-log4j.properties
>
>
> These envionment variable I've specified from a command prompt and  
> I've run
> start-server command from the same instance.
>
> My fp-log4j.properties is as follows
>
> #attach an appender to the base apacheds package logger:
> log4j.logger.org.apache.directory=INFO,fp
> #do not log apacheds to geronimo logs:
> log4j.additivity.org.apache.directory=false
>
>
> #Configure the fp specific appender:
> log4j.appender.fp=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.fp.layout=org.apache.log4j.PatternLayout
> # geronimo style logging
> log4j.appender.fp.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}]  
> %m%n
>
> log4j.appender.fp.append=true
> log4j.appender.fp.file=${org.apache.geronimo.server.dir}/var/log/ 
> fp.log
> log4j.appender.fp.bufferedIO=false
>
>
> #focal point specific log settings
> log4j.logger.com.telelogic.focalpoint=DEBUG
> log4j.logger.com.telelogic.focalpoint.dao.jdbc.Jdbc=OFF
> log4j.logger.com.telelogic.focalpoint.dao.ViewExecutor=OFF
> log4j.logger.org.apache.catalina=INFO
> log4j.logger.org.springframework=INFO
> log4j.logger.net.sf.ehcache.distribution=INFO
>
> Please advice me where I went wrong
> --

log4j.configuration should be a URL, not a file specification.   
Backslashes are illegal characters in URL's and I would expect that  
would result in no configuration being located:  Try:

> JAVA_OPTS=-Dlog4j.configuration=file:///C:/WebSphere/AppServerCommunityEdition/var/log/fp-log4j.properties



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