All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.chimpcentral.simpleLogger.Logger Maven / Gradle / Ivy

There is a newer version: 2.5.1
Show newest version
package com.chimpcentral.simpleLogger;

import java.io.IOException;

public class Logger extends Loggable {

	LoggerOptions loggerOptions = null;
	LogFile logFile = null;
	
	public Logger(LoggerOptions loggerOptions) {
		super("main");
		this.loggerOptions = loggerOptions;
		createBaseHTMLFile();
	}
	
	public Logger() {
		this(new LoggerOptions());
	}
	
	public LoggerOptions getLoggerOptions() {
		return this.loggerOptions;
	}
	
	LogFile getLogFile() {
		return this.logFile;
	}
	
	private void createBaseHTMLFile() {
		try {
			logFile = new LogFile(loggerOptions);
		} catch (IOException e) {
			System.out.println("**********LOGGER EXCEPTION START*********");
			System.out.println("Could not create logger");
			e.printStackTrace();
			System.out.println("**********LOGGER EXCEPTION END*********");
		}
	}
	
	public Log createLog(String name) {
		return new Log(this.logFile, name);
	}

	
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy