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 wayshue <wa...@employees.org> on 2003/07/23 00:12:33 UTC

classes in different VM log into different log files

hi,

I am a new log4j user. I need to write a wrapper class LogUtil to hide the
usage of log4j(version 1.1.3) from other developers. We have some classes
reside in Tomcat, and have some classes reside in our server VM. how do i
seperate them into two different files?
any examples of the log4j.properties file? Thanks.

The wrapper class I have is:

public class LogUtil
{
    static{
      String configFileName ="../log4j.properties";
      PropertyConfigurator.configureAndWatch(configFileName);
    }

  // log APIs
  public static void debug( Class classObj, String message )
  {
      String catName = preProcess(classObj);
      Category cat = Category.getInstance(catName);
      cat.debug(message);
  }
  ...
}

way


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