blob: 525f91c2ddf5ebe61a452c171b394981fd429db4 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2010 BSI Business Systems Integration AG.
* 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:
* BSI Business Systems Integration AG - initial API and implementation
******************************************************************************/
package org.eclipse.scout.sdk.internal.test;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.scout.sdk.util.log.SdkLogManager;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends Plugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.scout.sdk.test";
// The shared instance
private static Activator plugin;
private static SdkLogManager logManager;
/**
* The constructor
*/
public Activator() {
}
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
logManager = new SdkLogManager(this);
}
@Override
public void stop(BundleContext context) throws Exception {
logManager = null;
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
public static void logInfo(Throwable t) {
logManager.logInfo(t);
}
public static void logInfo(String message) {
logManager.logInfo(message);
}
public static void logInfo(String message, Throwable t) {
logManager.logInfo(message, t);
}
public static void logWarning(String message) {
logManager.logWarning(message);
}
public static void logWarning(Throwable t) {
logManager.logWarning(t);
}
public static void logWarning(String message, Throwable t) {
logManager.logWarning(message, t);
}
public static void logError(Throwable t) {
logManager.logError(t);
}
public static void logError(String message) {
logManager.logError(message);
}
public static void logError(String message, Throwable t) {
logManager.logError(message, t);
}
}