blob: 28acab54453a9ffc01aa1e126347138216c7a4d8 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.core.runtime;
import org.osgi.framework.Bundle;
/**
* A log to which status events can be written. Logs appear on individual
* plug-ins and on the platform itself. Clients can register log listeners which
* will receive notification of all log events as the come in.
* <p>
* This interface is not intended to be implemented by clients.
* </p>
*/
public interface ILog {
/**
* Adds the given log listener to this log. Subsequently the log listener will
* receive notification of all log events passing through this log.
* This method has no affect if the identical listener is already registered on this log.
*
* @param listener the listener to add to this log
* @see Platform#addLogListener(ILogListener)
*/
public void addLogListener(ILogListener listener);
/**
* Returns the plug-in with which this log is associated.
* <p>
* <b>Note</b>: This is an early access API to the new OSGI-based Eclipse 3.0
* Platform Runtime. Because the APIs for the new runtime have not yet been fully
* stabilized, they should only be used by clients needing to take particular
* advantage of new OSGI-specific functionality, and only then with the understanding
* that these APIs may well change in incompatible ways until they reach
* their finished, stable form (post-3.0). </p>
*
* @return the plug-in with which this log is associated
* @since 3.0
*/
public Bundle getBundle();
/**
* Logs the given status. The status is distributed to the log listeners
* installed on this log and then to the log listeners installed on the platform.
*
* @param status the status to log
*/
public void log(IStatus status);
/**
* Removes the given log listener to this log. Subsequently the log listener will
* no longer receive notification of log events passing through this log.
* This method has no affect if the identical listener is not registered on this log.
*
* @param listener the listener to remove
* @see Platform#removeLogListener(ILogListener)
*/
public void removeLogListener(ILogListener listener);
}