File D:\maven-qcr-plugin-testsunitaires\qcr4java\h2-1.3.170-sources\target\site\qc\lecode\message\TraceWriter.java.html

1 /*
2 * Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
3 * Version 1.0, and under the Eclipse Public License, Version 1.0
4 * (http://h2database.com/html/license.html).
5 * Initial Developer: H2 Group
6 */
7 package org.h2.message;
8
9 /**
10 * The backend of the trace system must implement this interface. Two
11 * implementations are supported: the (default) native trace writer
12 * implementation that can write to a file and to system out, and an adapter
13 * that uses SLF4J (Simple Logging Facade for Java).
14 */
15 interface TraceWriter {
16
17 /**
18 * Set the name of the database or trace object.
19 *
20 * @param name the new name
21 */
22 void setName(String name);
23
24 /**
25 * Write a message.
26 *
27 * @param level the trace level
28 * @param module the name of the module
29 * @param s the message
30 * @param t the exception (may be null)
31 */
32 void write(int level, String module, String s, Throwable t);
33
34 /**
35 * Check the given trace / log level is enabled.
36 *
37 * @param level the level
38 * @return true if the level is enabled
39 */
40 boolean isEnabled(int level);
41
42 }
43