|
From: <luc...@co...> - 2008-01-28 15:24:27
|
Hi, I'm using the service wrapper on Linux to launch an application =20
as a service (or daemon, whichever you prefer). This application uses =20
log4j to do its logging.
Everything runs fine if I have the "wrapper" executable and the =20
launch script directly in the application folder, like this:
<pre>
app_root/
wrapper <=3D=3D wrapper executable for linux
myapp.sh <=3D=3D myapp launch script
conf/
wrapper.conf
config/
myapp.conf
log4j.properties <=3D=3D This is the file
data.xml
...
...
lib/
myapp.jar
myapp_aux.jar
...
...
...
logs/
myapp.log
wrapper.log
</pre>
But if I use a new "bin" folder to put the script and wrapper in, like this:
<pre>
app_root/
bin/ <=3D=3D new "bin" folder
wrapper <=3D=3D wrapper executable for linux
myapp.sh <=3D=3D myapp launch script
conf/
wrapper.conf
config/
myapp.conf
log4j.properties <=3D=3D This is the file
data.xml
...
...
lib/
myapp.jar
myapp_aux.jar
...
...
...
logs/
myapp.log
wrapper.log
</pre>
(I have to change the script and wrapper.conf to reflect the new file =20
location, adding ".." in some places)
and run "./bin/myapp.sh" I get the following error:
<pre>
jvm 1 | log4j:WARN No appenders could be found for logger =20
(com.xxxxxx.xxx.xxxxx.myAppMain).
jvm 1 | log4j:WARN Please initialize the log4j system properly.
wrapper | <-- Wrapper Stopped
</pre>
The log4j.properties file has the following lines:
<pre>
log4j.rootLogger=3DWARN, A1, C1
log4j.logger.xxxxxx.xxx.xxxxx=3DDEBUG
## Generic appender
log4j.appender.C1=3Dorg.apache.log4j.ConsoleAppender
log4j.appender.C1.layout=3Dorg.apache.log4j.PatternLayout
log4j.appender.C1.layout.ConversionPattern=3D%-5p %c %x - %m%n
## MyApp generic Appender
log4j.appender.A1=3Dorg.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.Threshold=3DINFO
log4j.appender.A1.ImmediateFlush=3Dtrue
log4j.appender.A1.File=3Dlogs/myapp.log
log4j.appender.A1.Append=3Dtrue
# Daily rotation
log4j.appender.A1.Threshold=3DDatePattern=3D'.'yyyy-MM-dd'.log'
log4j.appender.A1.layout=3Dorg.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=3D%d{DATE} [%t] %-5p %c %x - %m%n
</pre>
Any ideas why the wrapper console throws that error?
Thanks,
Lucas Vieites
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
|