001: /*
002: * Distributed as part of c3p0 v.0.9.1.2
003: *
004: * Copyright (C) 2005 Machinery For Change, Inc.
005: *
006: * Author: Steve Waldman <swaldman@mchange.com>
007: *
008: * This library is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU Lesser General Public License version 2.1, as
010: * published by the Free Software Foundation.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015: * GNU Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public License
018: * along with this software; see the file LICENSE. If not, write to the
019: * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
020: * Boston, MA 02111-1307, USA.
021: */
022:
023: package com.mchange.v2.log;
024:
025: import java.util.*;
026:
027: /**
028: * This is an interface designed to wrap around the JDK1.4 logging API, without
029: * having any compilation dependencies on that API, so that applications that use
030: * MLogger in a non JDK1.4 environment, or where some other logging library is
031: * prefrerred, may do so.
032: *
033: * Calls to handler and filter related methods may be ignored if some logging
034: * system besides jdk1.4 logging is the underlying library.
035: */
036: public interface MLogger {
037: public ResourceBundle getResourceBundle();
038:
039: public String getResourceBundleName();
040:
041: public void setFilter(Object java14Filter) throws SecurityException;
042:
043: public Object getFilter();
044:
045: public void log(MLevel l, String msg);
046:
047: public void log(MLevel l, String msg, Object param);
048:
049: public void log(MLevel l, String msg, Object[] params);
050:
051: public void log(MLevel l, String msg, Throwable t);
052:
053: public void logp(MLevel l, String srcClass, String srcMeth,
054: String msg);
055:
056: public void logp(MLevel l, String srcClass, String srcMeth,
057: String msg, Object param);
058:
059: public void logp(MLevel l, String srcClass, String srcMeth,
060: String msg, Object[] params);
061:
062: public void logp(MLevel l, String srcClass, String srcMeth,
063: String msg, Throwable t);
064:
065: public void logrb(MLevel l, String srcClass, String srcMeth,
066: String rb, String msg);
067:
068: public void logrb(MLevel l, String srcClass, String srcMeth,
069: String rb, String msg, Object param);
070:
071: public void logrb(MLevel l, String srcClass, String srcMeth,
072: String rb, String msg, Object[] params);
073:
074: public void logrb(MLevel l, String srcClass, String srcMeth,
075: String rb, String msg, Throwable t);
076:
077: public void entering(String srcClass, String srcMeth);
078:
079: public void entering(String srcClass, String srcMeth, Object param);
080:
081: public void entering(String srcClass, String srcMeth,
082: Object params[]);
083:
084: public void exiting(String srcClass, String srcMeth);
085:
086: public void exiting(String srcClass, String srcMeth, Object result);
087:
088: public void throwing(String srcClass, String srcMeth, Throwable t);
089:
090: public void severe(String msg);
091:
092: public void warning(String msg);
093:
094: public void info(String msg);
095:
096: public void config(String msg);
097:
098: public void fine(String msg);
099:
100: public void finer(String msg);
101:
102: public void finest(String msg);
103:
104: public void setLevel(MLevel l) throws SecurityException;
105:
106: public MLevel getLevel();
107:
108: public boolean isLoggable(MLevel l);
109:
110: public String getName();
111:
112: public void addHandler(Object h) throws SecurityException;
113:
114: public void removeHandler(Object h) throws SecurityException;
115:
116: public Object[] getHandlers();
117:
118: public void setUseParentHandlers(boolean uph);
119:
120: public boolean getUseParentHandlers();
121: }
|