## php.java.bridge
Class Log4jLogger

    java.lang.Object
      php.java.bridge.Log4jLogger

All Implemented Interfaces:
  ILogger

Direct Known Subclasses:
  ChainsawLogger

    public class Log4jLogger

extends java.lang.Object
implements ILogger

A logger which uses the log4j default appender. Requires that log4j.jar is in the classpath.

Field Summary

Fields inherited from interface php.java.bridge.ILogger
`DEBUG, ERROR, FATAL, INFO`

Method Summary
`static Log4jLogger` `createLog4jLogger()` Create a new log4j logger using the default appender.
`void` `log(int level, java.lang.String msg)` Log a message.
`void` `printStackTrace(java.lang.Throwable t)` Log a stack trace
`void` `warn(java.lang.String msg)` Display a warning if logLevel >= 1

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createLog4jLogger

    public static Log4jLogger createLog4jLogger()
                                         throws java.lang.Exception

  Create a new log4j logger using the default appender.

  Throws:
    `java.lang.Exception`
  See Also:
    `Util.setLogger(ILogger)`

### printStackTrace

    public void printStackTrace(java.lang.Throwable t)

  Description copied from interface: `ILogger`
  Log a stack trace

  Specified by:
    `printStackTrace` in interface `ILogger`
  Parameters:
    `t` - The Throwable

### log

    public void log(int level,
                    java.lang.String msg)

  Description copied from interface: `ILogger`
  Log a message.

  Specified by:
    `log` in interface `ILogger`
  Parameters:
    `level` - The log level 0: FATAL, 1:ERROR, 2: INFO, 3: DEBUG
    `msg` - The message

### warn

    public void warn(java.lang.String msg)

  Description copied from interface: `ILogger`
  Display a warning if logLevel >= 1

  Specified by:
    `warn` in interface `ILogger`
  Parameters:
    `msg` - The warn message