001 package com.agilejava.blammo;
002
003 /*
004 * Copyright (C) 2006, Wilfred Springer
005 *
006 * This library is free software; you can redistribute it and/or
007 * modify it under the terms of the GNU Lesser General Public
008 * License as published by the Free Software Foundation; either
009 * version 2.1 of the License, or (at your option) any later version.
010 *
011 * This library is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014 * Lesser General Public License for more details.
015 *
016 * You should have received a copy of the GNU Lesser General Public
017 * License along with this library; if not, write to the Free Software
018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
019 */
020
021
022 /**
023 * The interface for abstractions representing a low-level logging toolkit. The
024 * most important responsibility of implementations of this interface is to
025 * create {@link LogKitAdapter}s, allowing Blammo to work against a
026 * canonicalized logging interface behind the scenes.
027 *
028 * Implement this interface if you want your code to use a non-supported
029 * low-level logging toolkit, i.e. application server specific logging
030 * mechanisms.
031 *
032 * @author Wilfred Springer
033 */
034 public interface LoggingKit {
035
036 /**
037 * Creates a <code>LogKitAdapter</code> for the class passed in.
038 *
039 * @param cl
040 * The class is just passed in as a courtesy to low level
041 * frameworks, who will normally have a smart way of connecting
042 * log messages to a class and then allow filters to be specified
043 * on the log messages generated. (Not <code>null</code>.)
044 * @return A <code>LoggingKitAdapter</code>, used internally by Blammo to
045 * log messages.
046 */
047 LoggingKitAdapter createLogKitAdapter(Class cl);
048
049 }