FileDocCategorySizeDatePackage
SystemOutLogger.javaAPI DocApache Poi 3.0.12338Mon Jan 01 12:39:42 GMT 2007org.apache.poi.util

SystemOutLogger

public class SystemOutLogger extends POILogger
A logger class that strives to make it as easy as possible for developers to write log calls, while simultaneously making those calls as cheap as possible by performing lazy evaluation of the log message.
author
Marc Johnson (mjohnson at apache dot org)
author
Glen Stampoultzis (glens at apache.org)
author
Nicola Ken Barozzi (nicolaken at apache.org)

Fields Summary
private String
cat
Constructors Summary
Methods Summary
public booleancheck(int level)
Check if a logger is enabled to log at the specified level

param
level One of DEBUG, INFO, WARN, ERROR, FATAL
see
#DEBUG
see
#INFO
see
#WARN
see
#ERROR
see
#FATAL

        int currentLevel = Integer.parseInt(System.getProperty("poi.log.level", WARN + ""));
        if (level >= currentLevel)
            return true;
        else
            return false;
    
public voidinitialize(java.lang.String cat)

       this.cat=cat;
    
public voidlog(int level, java.lang.Object obj1)
Log a message

param
level One of DEBUG, INFO, WARN, ERROR, FATAL
param
obj1 The object to log.

        if (check(level))
            System.out.println("["+cat+"] "+obj1);