org.openptk.logging
Class SysoutLogger

java.lang.Object
  extended by org.openptk.logging.SysoutLogger
All Implemented Interfaces:
LoggingIF

public class SysoutLogger
extends java.lang.Object
implements LoggingIF

Logger implementation that logs all messages to standard system output.

Author:
Terry Sigle

Field Summary
 
Fields inherited from interface org.openptk.logging.LoggingIF
PROP_CLASSNAME, PROP_FILENAME
 
Constructor Summary
SysoutLogger()
           
 
Method Summary
 void addConsole()
           
 void addFile(java.lang.String file)
           
 void close()
           
 void finialize()
           
 java.lang.String getId()
           
 void log(java.lang.String msg)
          Prints the message to standard output as an INFO level message.
 void logError(java.lang.String msg)
          Prints the message to standard output as an ERROR level message.
 void logInfo(java.lang.String msg)
          Prints the message to standard output as an INFO level message.
 void logWarning(java.lang.String msg)
          Prints the message to standard output as an WARNING level message.
 void put(LoggingLevel type, java.lang.String msg)
          Prints the message to standard output using the LoggingLevel type passed.
 void put(java.lang.String msg)
          Prints the message to standard output using the INFO level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SysoutLogger

public SysoutLogger()
Method Detail

addConsole

public void addConsole()
Specified by:
addConsole in interface LoggingIF

addFile

public void addFile(java.lang.String file)
             throws java.lang.Exception
Specified by:
addFile in interface LoggingIF
Parameters:
file -
Throws:
java.lang.Exception

close

public void close()
Specified by:
close in interface LoggingIF

finialize

public void finialize()
               throws java.lang.Throwable
Throws:
java.lang.Throwable

getId

public java.lang.String getId()
Specified by:
getId in interface LoggingIF

log

public void log(java.lang.String msg)
Prints the message to standard output as an INFO level message.

Specified by:
log in interface LoggingIF
Parameters:
msg - String to be printed to standard output.

logError

public void logError(java.lang.String msg)
Prints the message to standard output as an ERROR level message.

Specified by:
logError in interface LoggingIF
Parameters:
msg - String to be printed to standard output.

logInfo

public void logInfo(java.lang.String msg)
Prints the message to standard output as an INFO level message.

Specified by:
logInfo in interface LoggingIF
Parameters:
msg - String to be printed to standard output.

logWarning

public void logWarning(java.lang.String msg)
Prints the message to standard output as an WARNING level message.

Specified by:
logWarning in interface LoggingIF
Parameters:
msg - String to be printed to standard output.

put

public void put(LoggingLevel type,
                java.lang.String msg)
Prints the message to standard output using the LoggingLevel type passed.

Specified by:
put in interface LoggingIF
Parameters:
type - LoggingLevel to log the message as
msg - String to be printed to standard output.

put

public void put(java.lang.String msg)
Prints the message to standard output using the INFO level.

Specified by:
put in interface LoggingIF
Parameters:
msg - String to be printed to standard output.


View/submit a bug or feature

For further API reference and developer documentation, see www.openptk.org. That documentation contains more detailed, developer-targeted descriptions, definitions of terms, workarounds, and working code examples.

Copyright (C) 2008-2012, Project OpenPTK. All Rights Reserved