0
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
package com.symbian.smt.gui;
|
|
17 |
|
|
18 |
import org.eclipse.core.runtime.Status;
|
|
19 |
|
|
20 |
public class Logger {
|
|
21 |
static Activator theActivator = new Activator();
|
|
22 |
|
|
23 |
/**
|
|
24 |
* Logs an entry in the Eclipse error log
|
|
25 |
*
|
|
26 |
* @param String
|
|
27 |
* Text to appear in the Message field of the Error Log
|
|
28 |
* @return void
|
|
29 |
*/
|
|
30 |
public static void log(String msg) {
|
|
31 |
log(msg, null);
|
|
32 |
}
|
|
33 |
|
|
34 |
/**
|
|
35 |
* Logs an entry in the Eclipse error log
|
|
36 |
*
|
|
37 |
* @param String
|
|
38 |
* Text to appear in the Message field of the Error Log
|
|
39 |
* @param Exception
|
|
40 |
* The exception to log
|
|
41 |
* @return void
|
|
42 |
*/
|
|
43 |
public static void log(String msg, Exception e) {
|
|
44 |
theActivator.getLog()
|
|
45 |
.log(
|
|
46 |
new Status(Status.ERROR, Activator.PLUGIN_ID,
|
|
47 |
Status.OK, msg, e));
|
|
48 |
}
|
|
49 |
|
|
50 |
private Logger() {
|
|
51 |
}
|
|
52 |
} |