1 /**
2 * Logback: the reliable, generic, fast and flexible logging framework.
3 * Copyright (C) 1999-2009, QOS.ch. All rights reserved.
4 *
5 * This program and the accompanying materials are dual-licensed under
6 * either the terms of the Eclipse Public License v1.0 as published by
7 * the Eclipse Foundation
8 *
9 * or (per the licensee's choosing)
10 *
11 * under the terms of the GNU Lesser General Public License version 2.1
12 * as published by the Free Software Foundation.
13 */
14 package ch.qos.logback.classic.spi;
15
16 import java.util.Map;
17
18 import org.slf4j.Marker;
19
20 import ch.qos.logback.classic.Level;
21
22 /**
23 * The central interface in logback-classic. In a nutshell, logback-classic is
24 * nothing more than a processing chain built around this interface.
25 *
26 * @author Ceki Gülcü
27 * @since 0.9.16
28 */
29 public interface ILoggingEvent {
30
31 public String getThreadName();
32
33 public Level getLevel();
34
35 public String getMessage();
36
37 public Object[] getArgumentArray();
38
39 public String getFormattedMessage();
40
41 public String getLoggerName();
42
43 public LoggerContextVO getLoggerContextVO();
44
45 public IThrowableProxy getThrowableProxy();
46
47 /**
48 * Return caller data associated with this event. Note that calling this event
49 * may trigger the computation of caller data.
50 *
51 * @return the caller data associated with this event.
52 *
53 * @see #hasCallerData()
54 */
55 public StackTraceElement[] getCallerData();
56
57 /**
58 * If this event has caller data, then true is returned. Otherwise the
59 * returned value is null.
60 *
61 * <p>Logback components wishing to use caller data if available without
62 * causing it to be computed can invoke this method before invoking
63 * {@link #getCallerData()}.
64 *
65 * @return whether this event has caller data
66 */
67 public boolean hasCallerData();
68
69 public Marker getMarker();
70
71 public Map<String, String> getMDCPropertyMap();
72
73 public long getTimeStamp();
74
75 public void prepareForDeferredProcessing();
76
77 }