Glassfishv3 and log4j
I´m using glassfishv3 for few days. But i don´t know how to get log4j working with the v3.
In glassfishv2 there was a "System Classpath" field which you could used in order to point to your log4j.properties file.
But in glassfishv3 "System Cl开发者_如何转开发asspath" is not supported any more.
So where i have to put the log4j.properties file on glassfishv3???
Thanks
It works when i copy the log4j.properties file into the /opt/glassfishv3/glassfish/domains/domain1/lib/classes folder.
Then it is in the classpath ;)
By default, log4j.properties
is located in the root of the classpath. You can override this location by setting the log4j.configuration
system property, e.g.
-Dlog4j.configuration=my/path/to/log4j.properties
So then it can reside anywhere in the classpath you like.
As to how to set system properties in glassfish, I have no idea, but it can't be that hard.
精彩评论