01: //** Copyright Statement ***************************************************
02: //The Salmon Open Framework for Internet Applications (SOFIA)
03: // Copyright (C) 1999 - 2002, Salmon LLC
04: //
05: // This program is free software; you can redistribute it and/or
06: // modify it under the terms of the GNU General Public License version 2
07: // as published by the Free Software Foundation;
08: //
09: // This program is distributed in the hope that it will be useful,
10: // but WITHOUT ANY WARRANTY; without even the implied warranty of
11: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: // GNU General Public License for more details.
13: //
14: // You should have received a copy of the GNU General Public License
15: // along with this program; if not, write to the Free Software
16: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: //
18: // For more information please visit http://www.salmonllc.com
19: //** End Copyright Statement ***************************************************
20: package com.salmonllc.util;
21:
22: /**
23: * Interface used by the message log to write messages to different logging packages, like JDK 1.4 logging and Log4J
24: */
25:
26: public interface Logger {
27: public static final int TYPE_ASSERTION = 0;
28: public static final int TYPE_DEBUG = 1;
29: public static final int TYPE_ERROR = 2;
30: public static final int TYPE_INFO = 3;
31: public static final int TYPE_SQL = 4;
32:
33: /**
34: * Log a message to the appropriate message logging package
35: * @param message The message to log
36: * @param type The type, see TYPE constants at the top of the page
37: * @param level The error level
38: * @param e an error message
39: * @param o the object logging the message
40: */
41: public void log(String message, int type, int level, Throwable e,
42: Object o);
43: }
|