Servertec Logger
Content
Introduction
Release Notes
Features
FAQs
Requirements
Installation
Add-ons
How To
Change Log
Future Plans
Knowledge Base
Documentation
Conventions
Command Line
Administrator
Localization
Programming
Security
Performance
Deployment
Java API
AccessLogEntry
Codecs
Connection
ConnectionPool...
DString
ErrorLogEntry
EventLogEntry
FileCache
FileUpload
IOHandler
IOManager
iws
Logger
MonitorEvent...
MultiPartForm
QuickSort
Realm
RealmAdmin...
RealmManager
ServletContextImpl
ServletContext...
ServletImpl
ServletManager
SocketHandler
Utils

Servlet API
CGI
SSI
Servlets
Config Files
Log Files
Classes
Directory Tree
Samples
Legal
Contact Us

 

java.lang.Object
 |
 +--stec.iws.Logger

public abstract class Logger implement Runnable

Defines methods used by the Logger service.

Methods

Method Description
destroy Called by the server when stopping the Logger service.
init Called by the server to initialize the Logger service.
log Used to log messages, exceptions or an access, event or error log entry.
output Called by Logger service to output an access, event or error log entry.

destroy

Called by the server when stopping the Logger service.

Syntax

public void destroy()

Parameters

None

Returns

Nothing

Throws

Nothing

Example

public destroy()
{
  super.destroy();
  close_files();
}


init

Called to log an access, event or error log entry.

Syntax

public void init(Hashtable parameters) throws Exception

Parameters

parameters a hashtable containing initialization parameters.

Returns

Nothing

Throws

Exception any exception thrown.

Example

public void init(Hashtable parameters) throws Exception
{
  super.init(parameters);

  String filename;

  Object obj = parameters.get(file_name);
  if(obj == null)
  {
    filename = "log.dat";
  }
  else
  {
    filename = ((String[])obj)[0];
  }

  open_files(file_name);
}


log

Used to log messages, exceptions or an access, event or error log entry.

Syntax

public void log(AccessLogEntry accessEntry)
public void log(Throwable exception)
public void log(Throwable exception, String message)
public void log(String message)

Parameters

accessEntry an access log entry.
errorEntry an error log entry.
eventEntry an event log entry.
exception an Error or Exception object.
message event message to log.

Returns

Nothing

Throws

Nothing

Example

log(msg);

output

Called by Logger service to output an access, event or error log entry.

Syntax

public abstract void output(AccessLogEntry accessEntry)
                            throws Exception

public abstract void output(EventLogEntry eventEntry)
                            throws Exception

public abstract void output(ErrorLogEntry errorEntry)
                            throws Exception

Parameters

accessEntry an access log entry.
eventEntry an event log entry.
errorEntry an error log entry.

Returns

Nothing

Throws

Exception any exception thrown.

Example

public void output(AccessLogEntry entry) throws Exception
{
  logAccess(entry);
}

 top of page
Copyright © 1998-2005 Servertec. All rights reserved.
Privacy Statement.
Last Modified: Sun Sep 04 14:56:49 EDT 2005