com.caucho.env.log
Class ProLogSystem

java.lang.Object
  extended by com.caucho.env.service.AbstractResinSubSystem
      extended by com.caucho.env.log.LogSystem
          extended by com.caucho.env.log.ProLogSystem
All Implemented Interfaces:
ResinSubSystem

@Service
public class ProLogSystem
extends LogSystem

The LogService records log entries in a persistent database for administrative debugging.


Field Summary
 
Fields inherited from interface com.caucho.env.service.ResinSubSystem
START_PRIORITY_CACHE_SERVICE, START_PRIORITY_CLASSLOADER, START_PRIORITY_CLUSTER_SERVICE, START_PRIORITY_DEFAULT, START_PRIORITY_ENV_SYSTEM, START_PRIORITY_NETWORK_CLUSTER
 
Method Summary
static ProLogSystem createAndAddService()
           
 java.lang.String createFullType(java.lang.String name)
          Creates the full log name a partial name.
 LogMessage[] findMessages(java.lang.String fullType, java.lang.String levelName, long minTime, long maxTime)
           
 LogMessage[] findMessagesByName(java.lang.String fullType, java.lang.String logName, java.lang.String levelName, long minTime, long maxTime)
           
 long[] findMessageTimes(java.lang.String fullType, java.lang.String levelName, long minTime, long maxTime)
           
 long[] findMessageTimesByName(java.lang.String fullType, java.lang.String logName, java.lang.String levelName, long minTime, long maxTime)
           
 long getExpireTimeout()
           
 void log(long timestamp, java.lang.String fullType, java.lang.String name, java.util.logging.Level level, java.lang.String message)
          Logs a message given a full name.
 void log(java.lang.String fullType, java.lang.String message)
          Logs a message given a full name.
 void log(java.lang.String fullType, java.lang.String name, java.util.logging.Level level, java.lang.String message)
          Logs a message given a full name.
 void logStream(long timestamp, java.lang.String fullType, java.lang.String name, java.util.logging.Level level, java.io.InputStream is)
          Logs a message given a full name.
 void logStream(java.lang.String fullType, java.io.InputStream is)
          Logs a message given a full name.
 WriteStream openLogStream(long timestamp, java.lang.String fullType, java.lang.String name, java.util.logging.Level level)
          Logs a message given a full name.
 WriteStream openLogStream(java.lang.String fullType)
          Logs a message given a full name.
 void setExpireTimeout(long timeout)
           
 void setLevel(java.util.logging.Level level)
           
 void start()
          Starts the log service.
 void stop()
          Starts the log service.
 
Methods inherited from class com.caucho.env.log.LogSystem
getCurrent, init
 
Methods inherited from class com.caucho.env.service.AbstractResinSubSystem
destroy, getStartPriority, getStopPriority, preCreate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createAndAddService

public static ProLogSystem createAndAddService()

setLevel

public void setLevel(java.util.logging.Level level)
Overrides:
setLevel in class LogSystem

setExpireTimeout

public void setExpireTimeout(long timeout)
Overrides:
setExpireTimeout in class LogSystem

getExpireTimeout

public long getExpireTimeout()
Overrides:
getExpireTimeout in class LogSystem

createFullType

public java.lang.String createFullType(java.lang.String name)
Creates the full log name a partial name.

Overrides:
createFullType in class LogSystem

log

public void log(java.lang.String fullType,
                java.lang.String message)
Logs a message given a full name.

Overrides:
log in class LogSystem

log

public void log(java.lang.String fullType,
                java.lang.String name,
                java.util.logging.Level level,
                java.lang.String message)
Logs a message given a full name.

Overrides:
log in class LogSystem

log

public void log(long timestamp,
                java.lang.String fullType,
                java.lang.String name,
                java.util.logging.Level level,
                java.lang.String message)
Logs a message given a full name.

Overrides:
log in class LogSystem

logStream

public void logStream(java.lang.String fullType,
                      java.io.InputStream is)
Logs a message given a full name.

Overrides:
logStream in class LogSystem

logStream

public void logStream(long timestamp,
                      java.lang.String fullType,
                      java.lang.String name,
                      java.util.logging.Level level,
                      java.io.InputStream is)
Logs a message given a full name.

Overrides:
logStream in class LogSystem

openLogStream

public WriteStream openLogStream(java.lang.String fullType)
Logs a message given a full name.

Overrides:
openLogStream in class LogSystem

openLogStream

public WriteStream openLogStream(long timestamp,
                                 java.lang.String fullType,
                                 java.lang.String name,
                                 java.util.logging.Level level)
Logs a message given a full name.

Overrides:
openLogStream in class LogSystem

findMessages

public LogMessage[] findMessages(java.lang.String fullType,
                                 java.lang.String levelName,
                                 long minTime,
                                 long maxTime)
Overrides:
findMessages in class LogSystem

findMessagesByName

public LogMessage[] findMessagesByName(java.lang.String fullType,
                                       java.lang.String logName,
                                       java.lang.String levelName,
                                       long minTime,
                                       long maxTime)
Overrides:
findMessagesByName in class LogSystem

findMessageTimes

public long[] findMessageTimes(java.lang.String fullType,
                               java.lang.String levelName,
                               long minTime,
                               long maxTime)
Overrides:
findMessageTimes in class LogSystem

findMessageTimesByName

public long[] findMessageTimesByName(java.lang.String fullType,
                                     java.lang.String logName,
                                     java.lang.String levelName,
                                     long minTime,
                                     long maxTime)

start

public void start()
           throws java.sql.SQLException
Starts the log service.

Specified by:
start in interface ResinSubSystem
Overrides:
start in class AbstractResinSubSystem
Throws:
java.sql.SQLException

stop

public void stop()
Starts the log service.

Specified by:
stop in interface ResinSubSystem
Overrides:
stop in class AbstractResinSubSystem