blob: e346947e50a910ac7065579d7d855dc6dcca58b9 [file] [log] [blame]
lmandel3c550af2005-06-16 05:46:02 +00001/*******************************************************************************
2 * Copyright (c) 2001, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11
12package org.eclipse.wst.xml.core.internal.validation.core.logging;
13
14import org.eclipse.core.runtime.IStatus;
15import org.eclipse.core.runtime.Status;
16import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
17
18
19/**
20 * A logger that will log to the log file in the eclipse metadata directory.
21 */
22public class EclipseLogger implements ILogger
23{
24
25 public void logError(String error, Throwable exception)
26 {
27 XMLCorePlugin.getDefault().getLog().log(new Status(IStatus.ERROR, XMLCorePlugin.getDefault().getBundle().getSymbolicName(), IStatus.ERROR, error, exception));
28 }
29
30 public void logWarning(String warning, Throwable exception)
31 {
32 XMLCorePlugin.getDefault().getLog().log(new Status(IStatus.WARNING, XMLCorePlugin.getDefault().getBundle().getSymbolicName(), IStatus.WARNING, warning, exception));
33 }
34}