blob: 573cf2de9c74b9390245829cc6bb5f175e083b8a [file] [log] [blame]
lmandel3c550af2005-06-16 05:46:02 +00001/*******************************************************************************
amywuecebb042007-04-10 20:07:35 +00002 * Copyright (c) 2001, 2005 IBM Corporation and others.
lmandel3c550af2005-06-16 05:46:02 +00003 * 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
amywuecebb042007-04-10 20:07:35 +00007 *
lmandel3c550af2005-06-16 05:46:02 +00008 * 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}