Logo Search packages:      
Sourcecode: jaminid version File versions  Download package

SingletonLogger.java

package com.prolixtech.utils;


/**
 * This class provides a single logging utility used for debugging purposes. It
 * delegates most of its work to the java logging system, however it is made a
 * singleton here so that it can be used throughout the application.
 * 
 * @author Constantinos Michael
 * 
 * 
 */
00013 public class SingletonLogger extends NullLogger {
    
    private static MboxLogger inst = NullLogger.Instance();
    private static boolean log;
    
    public static void setLog(boolean x){
        if(log!=x){
            if(x){
                inst = JavaLogger.Instance();
            } else {
                inst = NullLogger.Instance();
            }
        }
        log=x;
    }
    
00029     public static MboxLogger Instance(){
        return inst;
    }
    
    public SingletonLogger(){
        //
    }

}

Generated by  Doxygen 1.6.0   Back to index