log4j again on websphere - Websphere

This is a discussion on log4j again on websphere - Websphere ; Hi All, Please forgive me for posting new thread on this old issue. I have searched on this forum for previous entries, but none of solution are working for me on our servers. I want to configure log4j with websphere ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: log4j again on websphere

  1. log4j again on websphere

    Hi All,
    Please forgive me for posting new thread on this old issue. I have searched on this forum for previous entries, but none of solution are working for me on our servers.
    I want to configure log4j with websphere (6.0.) with spring application, I did reading about websphere class loading for logging and have used possible solutions suggested there. I have created files in Meta-INF/services and have configured the log4jFactoryImpl in that. Also i have placed commons-logging.properties file in WEB-INF/classes with priority=1 and Log instance for Log4j.
    I am using websphere (6.1) on my local system whereas our server still uses websphere 6.0.
    Everything is working fine on my local environment, logs are coming as expected, but on SIT server consoleAppender seems to be not working. Logs are getting transferred to file and FileAppender works file. On another server (UAT) with websphere 6.0 the logs itself are not coming. While application is being loaded i can clearly see initialization of log4j and file is being created, but its not logging.After creating file i don't know how it falls back to Java logging.
    All the servers are configured with classloaded as Multiple and PARENT_LAST.

    I am thinking of moving to SLF4J, but not sure whether that would solve the problem. Although google says it would My question with respect to this is commons-logging classes would still be loaded as a part of websphere startup, but would SLF4J solve my problem?
    I would try this on our SIT box, but was curious if anyone can guess why console appender was not working on SIT whereas it is working fine on my local env.

    Thanks and Regards
    Pankaj

  2. Re: log4j again on websphere

    I had done some investigation on using Log4J with WAS. This is captured [in this article|http://www.webagesolutions.com/knowl...04/index.html]. Although the article is for WAS v5, it works the same way in v6.0.x.

+ Reply to Thread