]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.message/src/org/simantics/message/ILogger.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.message / src / org / simantics / message / ILogger.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.message;
13
14 import org.eclipse.core.runtime.IStatus;
15
16 /**
17  * A log to which status events can be written. Logs appear on individual
18  * plug-ins and on the platform itself. Clients can register log listeners which
19  * will receive notification of all log events as they come in.
20  * 
21  * @author Tuukka Lehtonen
22  * @noimplement This interface is not intended to be implemented by clients.
23  */
24 public interface ILogger {
25
26     /**
27      * Adds the given log listener to this log.  Subsequently the log listener will
28      * receive notification of all log events passing through this log.
29      * This method has no affect if the identical listener is already registered on this log.
30      *
31      * @param listener the listener to add to this log
32      */
33     public void addLogListener(ILogListener listener);
34
35     /**
36      * Returns an identifier name for this log.
37      *
38      * @return the identifier name for this log
39      */
40     public String getName();
41
42     /**
43      * Logs the given status.  The status is distributed to the log listeners
44      * installed on this log and then to the log listeners installed on the platform.
45      *
46      * @param status the status to log
47      */
48     public void log(IStatus status);
49
50     /**
51      * Removes the given log listener to this log.  Subsequently the log listener will
52      * no longer receive notification of log events passing through this log.  
53      * This method has no affect if the identical listener is not registered on this log.
54      *
55      * @param listener the listener to remove
56      */
57     public void removeLogListener(ILogListener listener);
58
59 }