*** empty log message ***
[IRC.git] / Robust / Transactions / jcarderdstm2version / src / com / enea / jcarder / util / logging / Handler.java
diff --git a/Robust/Transactions/jcarderdstm2version/src/com/enea/jcarder/util/logging/Handler.java b/Robust/Transactions/jcarderdstm2version/src/com/enea/jcarder/util/logging/Handler.java
new file mode 100644 (file)
index 0000000..74ac348
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * JCarder -- cards Java programs to keep threads disentangled
+ *
+ * Copyright (C) 2006-2007 Enea AB
+ * Copyright (C) 2007 Ulrik Svensson
+ * Copyright (C) 2007 Joel Rosdahl
+ *
+ * This program is made available under the GNU GPL version 2, with a special
+ * exception for linking with JUnit. See the accompanying file LICENSE.txt for
+ * details.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+package com.enea.jcarder.util.logging;
+
+import com.enea.jcarder.util.logging.Logger.Level;
+
+/**
+ * This interface must be implemented by classes that handles log messages from
+ * the Logger class.
+ */
+public interface Handler {
+    /**
+     * Handle a published message.
+     *
+     * This method is called by a Logger class each time it receives a message
+     * to be logged.
+     *
+     * @param level Log level of the message.
+     * @param message The message.
+     */
+    void publish(Level level, String message);
+}