Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jserv
Class JServLog

    java.lang.Object
      |
      +--org.apache.jserv.JServLog

final class JServLog
extends java.lang.Object
implements JServSendError, Logger

This class is used to trace and report errors and execution. Made it a delegating class in order to ignore errors opening the logfile (hen)

Version:
  $Revision: 1.7 $ $Date: 1999/09/21 17:26:52 $
See Also:
  `LogWriter`

Field Summary
`boolean` | `active`
`private java.lang.String` | `errorMessage`
`private LogWriter` | `logger`

Constructor Summary
`JServLog(java.lang.String identifier, Configurations confs)` Construct this class

Method Summary
`void` | `flush()` Flush the log.
`java.lang.String` | `getSubsystemError()` returns the last Error occured in this subsystem
`boolean` | `isActive()` Tells if it is active.
`boolean` | `isActive(java.lang.String channel)` Tells if the given channel is active.
`boolean` | `isSane()` returns true if this subsystem is sane
`void` | `log(java.lang.String channel, java.lang.String message)` Prints the log message on the right channel.
`void` | `log(java.lang.String channel, java.lang.Throwable t)` Prints the error message and stack trace if channel enabled.
`void` | `sendError(int sc, java.lang.String msg)` Report a problem encountered while initializing.
`void` | `sendError(java.lang.Throwable error)` Report an exception or error encountered while loading a servlet.

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

Field Detail

### errorMessage

    private java.lang.String errorMessage

### logger

    private LogWriter logger

### active

    public boolean active

Constructor Detail

### JServLog

    public JServLog(java.lang.String identifier,
                    Configurations confs)

  Construct this class

Method Detail

### isActive

    public boolean isActive()

  Tells if it is active.
  Specified by:
    isActive in interface Logger

### isActive

    public boolean isActive(java.lang.String channel)

  Tells if the given channel is active.
  Specified by:
    isActive in interface Logger
  Parameters:
    `channel` - the channel to test.

### log

    public void log(java.lang.String channel,
                    java.lang.String message)

  Prints the log message on the right channel.

  A "channel" is a virtual log that may be enabled or disabled by setting the property "identifier".channel.???=true where ??? is the channel identifier that must be passed with the message. If a channel is not recognized or its property is set to false the message is not written.

  Specified by:
    log in interface Logger
  Parameters:
    `channel` - the channel to put the message on.
    `name` - the message to log.

### log

    public void log(java.lang.String channel,
                    java.lang.Throwable t)

  Prints the error message and stack trace if channel enabled.
  Specified by:
    log in interface Logger
  Parameters:
    `t` - the error thrown.

### flush

    public void flush()

  Flush the log. Write any pending messages into the log media.
  Specified by:
    flush in interface Logger

### sendError

    public void sendError(int sc,
                          java.lang.String msg)

  Report a problem encountered while initializing.
  Specified by:
    sendError in interface JServSendError

### sendError

    public void sendError(java.lang.Throwable error)

  Report an exception or error encountered while loading a servlet.
  Specified by:
    sendError in interface JServSendError

### getSubsystemError

    public java.lang.String getSubsystemError()

  returns the last Error occured in this subsystem

### isSane

    public boolean isSane()

  returns true if this subsystem is sane

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD