net.sourceforge.rssowl.util
Class LoggerImpl

java.lang.Object
  extended bynet.sourceforge.rssowl.util.LoggerImpl

public class LoggerImpl
extends Object

This class writes warning messages into a file

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  String criticalErrorLogPath
          Path used for the critical warning log file if needed
private static Logger logger
          Logger for RSSOwl
private static int MAX_LOG_SIZE
          Maximum number of bytes before flushing logfile
private static boolean useFileHandler
          TRUE: Print errors into file FALSE: Print errors to System.err
 
Constructor Summary
LoggerImpl()
          Creates a new instance of WiSimLogger
 
Method Summary
 void info(String msg, Throwable t)
          Log an info message
private  void initFileHandler()
          Init the FileHandler to use with the logger
private  void log(Level level, String msg, Throwable t)
          Perform a logging
 void log(String msg)
          Log warning with no exception
 void log(String msg, Throwable t)
          Log warning with a message
 void logCritical(String msg, Throwable t)
          Log critical errors that cause RSSOwl to crash in a seperate, unique file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static Logger logger
Logger for RSSOwl


MAX_LOG_SIZE

private static final int MAX_LOG_SIZE
Maximum number of bytes before flushing logfile

See Also:
Constant Field Values

useFileHandler

private static boolean useFileHandler
TRUE: Print errors into file FALSE: Print errors to System.err


criticalErrorLogPath

private String criticalErrorLogPath
Path used for the critical warning log file if needed

Constructor Detail

LoggerImpl

public LoggerImpl()
Creates a new instance of WiSimLogger

Method Detail

info

public void info(String msg,
                 Throwable t)
Log an info message

Parameters:
msg - The method where the info did occur
t - The Exception

log

public void log(String msg)
Log warning with no exception

Parameters:
msg - The message

log

public void log(String msg,
                Throwable t)
Log warning with a message

Parameters:
msg - The method where the warning did occur
t - The Exception

logCritical

public void logCritical(String msg,
                        Throwable t)
Log critical errors that cause RSSOwl to crash in a seperate, unique file. This will avoid the flushing of the log file on next startup of RSSOwl to review the warning later.

Parameters:
msg - The message to log
t - The Exception

initFileHandler

private void initFileHandler()
Init the FileHandler to use with the logger


log

private void log(Level level,
                 String msg,
                 Throwable t)
Perform a logging

Parameters:
level - Level of the log
msg - Message of the log
t - Exception of the log


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo