yu.ac.bg.etf.javaqx.logging.simple
Class SimpleLogger

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.logging.simple.SimpleLogger
All Implemented Interfaces:
LoggingAdapter
Direct Known Subclasses:
SimpleFileLogger

public class SimpleLogger
extends java.lang.Object
implements LoggingAdapter

Simple logging adapter implementation.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Constructor Summary
SimpleLogger()
          Constructs new SimpleLoggingAdapter object.
SimpleLogger(java.io.OutputStream infoStream)
          Constructs new SimpleLoggingAdapter object.
SimpleLogger(java.io.OutputStream errorStream, java.io.OutputStream infoStream)
          Constructs new SimpleLoggingAdapter object.
SimpleLogger(java.io.PrintStream errorStream)
          Constructs new SimpleLoggingAdapter object.
SimpleLogger(java.io.PrintStream errorStream, java.io.PrintStream infoStream)
          Constructs new SimpleLoggingAdapter object.
 
Method Summary
 int getLevel()
          Returns logging level.
 java.lang.String getName()
          Returns the name of the logging adapter.
 boolean isLoggable(int level)
          Returns true if logging on the specified level is enabled.
 void log(int level, java.lang.String fileName, int lineNumber, java.lang.String message, java.lang.Throwable t)
          Logs a message.
 void log(int level, java.lang.String message, java.lang.Throwable t)
          Logs a message.
 void setLevel(int level)
          Sets logging level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLogger

public SimpleLogger()
Constructs new SimpleLoggingAdapter object.


SimpleLogger

public SimpleLogger(java.io.OutputStream infoStream)
Constructs new SimpleLoggingAdapter object.

Parameters:
infoStream - the info stream

SimpleLogger

public SimpleLogger(java.io.OutputStream errorStream,
                    java.io.OutputStream infoStream)
Constructs new SimpleLoggingAdapter object.

Parameters:
errorStream - the error stream
infoStream - the info stream

SimpleLogger

public SimpleLogger(java.io.PrintStream errorStream)
Constructs new SimpleLoggingAdapter object.

Parameters:
errorStream - the error print stream

SimpleLogger

public SimpleLogger(java.io.PrintStream errorStream,
                    java.io.PrintStream infoStream)
Constructs new SimpleLoggingAdapter object.

Parameters:
errorStream - the error print stream
infoStream - the info print stream
Method Detail

getName

public java.lang.String getName()
Returns the name of the logging adapter.

Specified by:
getName in interface LoggingAdapter
Returns:
the name of the logging adapter

isLoggable

public boolean isLoggable(int level)
Returns true if logging on the specified level is enabled.

Specified by:
isLoggable in interface LoggingAdapter
Parameters:
level - the logging level
Returns:
true if logging on the specified level is enabled

getLevel

public int getLevel()
Returns logging level.

Specified by:
getLevel in interface LoggingAdapter
Returns:
level the logging level

setLevel

public void setLevel(int level)
Sets logging level.

Specified by:
setLevel in interface LoggingAdapter
Parameters:
level - the logging level

log

public void log(int level,
                java.lang.String message,
                java.lang.Throwable t)
Logs a message.

Specified by:
log in interface LoggingAdapter
Parameters:
level - the logging level
message - the message
t - the throwable

log

public void log(int level,
                java.lang.String fileName,
                int lineNumber,
                java.lang.String message,
                java.lang.Throwable t)
Logs a message.

Specified by:
log in interface LoggingAdapter
Parameters:
level - the logging level
fileName - the file name
lineNumber - the line number
message - the message
t - the throwable


Copyright © 2007 ETF and contributors. All Rights Reserved.