logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian McSweeney" <brian.mcswee...@aurium.net>
Subject RE: Newbie setup on Orion
Date Tue, 25 Nov 2003 12:35:00 GMT
Thanks a Million Thomas!

Really appreciate it. Guess what, only problem - didn't get it to work
:-)
Just to make sure again. I put the log4j.jar in orion/lib and the
log4j.xml in my WEB-INF/classes of the war. The war is inside an ear.

I can see the log4j.xml in the war when orion explodes it out in the
applications directory but I'm still getting the following error in
orion:


log4j:WARN No appenders could be found for logger
(com.myapp.web.onload.Init).
log4j:WARN Please initialize the log4j system properly.
java.lang.NullPointerException
        at com.myapp.web.onload.Init.setTimeZoneAndLocale(Unknown
Source)
        at com.myapp.web.onload.Init.contextInitialized(Unknown Source)
        at com.evermind._ay._lee(.:552)
        at com.evermind._ay.<init>(.:317)
        at com.evermind._am._rtb(.:607)
        at com.evermind._ex._rtb(.:581)
        at com.evermind._eu._kae(.:482)
        at com.evermind._eu._bi(.:226)
        at com.evermind._ex._bn(.:240)
        at com.evermind._ex._bi(.:146)
        at com.evermind.server.ApplicationServer._gke(.:1730)
        at com.evermind.server.ApplicationServer._bi(.:1068)
        at com.evermind._ctb.run(.:89)
        at java.lang.Thread.run(Thread.java:536)
        at com.evermind._bf.run(.:47)

Any ideas? Are you sure that you don't initialize log4j in code
anywhere? I'm running orion version 2.0.2
Thanks for the help!
Brian


-----Original Message-----
From: Thomas Svensen [mailto:tsv@cellus.no] 
Sent: 25 November 2003 12:05
To: Log4J Users List
Subject: RE: Newbie setup on Orion

Here is an extract of our log4j.xml file. Socket appender is nice, e.g.
lets
you have the server send logs to a local Chainsaw running on your own
computer :-)

Regarding file path, it is relative from the orion base directory. So
the
setup below logs to .../orion/log/content.log

Happy logging! :-)

- Thomas S.

<?xml version="1.0" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false"
xmlns:log4j="http://jakarta.apache.org/log4j/">
	<appender name="main"
class="org.apache.log4j.DailyRollingFileAppender">
		<param name="DatePattern" value="'.'yyyy-MM-dd"/>
		<param name="File" value="log/content.log"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern"
value="%d{HH:mm:ss,SSS} [%-5.5p]
%-20c{1}: %m %x\n"/>
		</layout>
	</appender>
	<appender name="socket-app"
class="org.apache.log4j.net.SocketAppender">
		<param name="RemoteHost" value="localhost" />
		<param name="Port" value="9200" />
	</appender>
	<root>
		<level value="INFO"/>
		<appender-ref ref="main"/>
		<appender-ref ref="socket-app"/>
	</root>
</log4j:configuration>




> -----Original Message-----
> From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
> Sent: 25. november 2003 12:55
> To: 'Log4J Users List'
> Subject: RE: Newbie setup on Orion
>
>
> Thanks Thomas,
>
> This looks like a much better way to go.
> Could you possibly tell me if it's possible then to log to a relative
> folder from the log4j.xml file in WEB-INF/classes?
>
> If you wouldn't mind sharing the log4j.xml file it would be a great
help
> too! Thanks so much,
>
> Brian
>
>
> -----Original Message-----
> From: Thomas Svensen [mailto:tsv@cellus.no]
> Sent: 25 November 2003 11:40
> To: Log4J Users List
> Subject: RE: Newbie setup on Orion
>
> We are using log4j successfully with Orion. What we are doing, is
> putting log4j.jar in the application "lib" directory and log4j.xml in
> the "WEB-INF/classes". Works fine :-)
>
> - Thomas S.
>
> > -----Original Message-----
> > From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
> > Sent: 25. november 2003 12:25
> > To: log4j-user@jakarta.apache.org
> > Subject: Newbie setup on Orion
> >
> >
> >
> > Hi all,
> >
> > I've used log4j with Jboss for ages and it works really well. Now
I'm
> > trying to port my app to Orion and I realise that I have to
initialize
> > log4j and setup the log4j properties file myself.
> >
> > I've read the docs and I'm trying to do it using an initialization
> > servlet.
> >
>
> <-- cut, cut-->
>
> >
> > Now, I presume I then have to put a basic log4j.properties file on
the
> > defined path above and away we go. However, when I put the log4j
> > properties file in the /orion/lib folder along with the jar itself I
> get
> > a nasty startup error. If anyone is successfully using log4j with
> orion
> > I could really do with a hand.
> >
> > Thanks so much,
> > Brian
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>



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


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


Mime
View raw message