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 sunita agrawal <ag...@hotmail.com> on 2002/04/04 20:48:25 UTC
Ceki G�lc� - please help
Hello Ceki,
I would apprecaite if you could give me info on how to use socket appender
to log messages from ejb's,servlets,jsps.I want to use
PropertyConfigurator.configure(filename) only once and made it avaliable to
all programs what would be the best way to do so?
Following is my properties file that i am currently using:
log4j.rootCategory=STDOUT_Appender,File_Appender
log4j.appender.STDOUT_Appender=org.apache.log4j.ConsoleAppender
log4j.appender.File_Appender=org.apache.log4j.RollingFileAppender
log4j.appender.File_Appender.File=E:/bea/wlserver6.1/samples/examples/log4jlog/log4jbea.log
log4j.appender.File_Appender.Append=true
log4j.appender.File_Appender.MaxFileSize=10kb
log4j.appender.File_Appender.MaxBackupIndex=4
log4j.appender.File_Appender.layout=org.apache.log4j.SimpleLayout
and the initialization servlet:
public class Log4jInit extends HttpServlet{
public void init(ServletConfig config) throws ServletException {
super.init(config);
// String prefix = getServletContext().getRealPath("/");
String file = getInitParameter("log4j-init-file");
// if the log4j-init-file is not set, then no point in trying
BasicConfigurator.configure();
PropertyConfigurator.configure(file);
}
....
I am not able to make the PropertyConfigurator.configure(file) avaible to
ejb's.
Any help in this matter is highly appreciated.
Thanks,
Sunita
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>