/******************************************************************************* * Copyright (c) 2007, 2010 Association for Decentralized Information Management * in Industry THTH ry. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * VTT Technical Research Centre of Finland - initial API and implementation *******************************************************************************/ package org.simantics.spreadsheet.common.logging; import org.simantics.spreadsheet.common.Activator; import org.simantics.utils.logging.LogManager; public class Logger extends org.simantics.utils.logging.Logger { private static final Logger INSTANCE = new Logger(); Logger() { super(new LogManager( defaultProperties("log4j.appender.default.File", "spreadsheet.log", "log4j.appender.default.append", "true", "log4j.appender.default.layout", "org.apache.log4j.PatternLayout", "log4j.appender.default.layout.ConversionPattern", "%d{ISO8601} %-6r [%15.15t] %-5p %30.30c - %m%n", "log4j.appender.default.File", Activator.LOG_FILE_NAME )).getLogger(LogManager.class)); } public static void defaultLogError(String message, Throwable exception) { INSTANCE.logError(message, exception); } public static void defaultLogError(Throwable exception) { INSTANCE.logError("Unexpected exception", exception); } public static void defaultLogWarning(String message, Throwable exception) { INSTANCE.logWarning(message, exception); } }