001/*
002 * $Id: Logger.java 4863 2011-05-12 07:01:55Z redlab_b $
003 *
004 * This file is part of the iText (R) project. Copyright (c) 1998-2011 1T3XT
005 * BVBA Authors: Balder Van Camp, Emiel Ackermann, et al.
006 *
007 * This program is free software; you can redistribute it and/or modify it under
008 * the terms of the GNU Affero General License version 3 as published by the
009 * Free Software Foundation with the addition of the following permission added
010 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
011 * IN WHICH THE COPYRIGHT IS OWNED BY 1T3XT, 1T3XT DISCLAIMS THE WARRANTY OF NON
012 * INFRINGEMENT OF THIRD PARTY RIGHTS.
013 *
014 * This program is distributed in the hope that it will be useful, but WITHOUT
015 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
016 * FOR A PARTICULAR PURPOSE. See the GNU Affero General License for more
017 * details. You should have received a copy of the GNU Affero General License
018 * along with this program; if not, see http://www.gnu.org/licenses or write to
019 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
020 * MA, 02110-1301 USA, or download the license from the following URL:
021 * http://itextpdf.com/terms-of-use/
022 *
023 * The interactive user interfaces in modified source and object code versions
024 * of this program must display Appropriate Legal Notices, as required under
025 * Section 5 of the GNU Affero General License.
026 *
027 * In accordance with Section 7(b) of the GNU Affero General License, a covered
028 * work must retain the producer line in every PDF that is created or
029 * manipulated using iText.
030 *
031 * You can be released from the requirements of the license by purchasing a
032 * commercial license. Buying such a license is mandatory as soon as you develop
033 * commercial activities involving the iText software without disclosing the
034 * source code of your own applications. These activities include: offering paid
035 * services to customers as an ASP, serving PDFs on the fly in a web
036 * application, shipping iText with a closed source product.
037 *
038 * For more information, please contact iText Software Corp. at this address:
039 * sales@itextpdf.com
040 */
041package com.itextpdf.text.log;
042
043/**
044 * Logger interface
045 * {@link LoggerFactory#setLogger(Logger)}.
046 *
047 * @author redlab_b
048 *
049 */
050public interface Logger {
051
052        /**
053         * @param klass
054         * @return the logger for the given klass
055         */
056        Logger getLogger(Class<?> klass);
057
058        Logger getLogger(String name);
059        /**
060         * @param level
061         * @return true if there should be logged for the given level
062         */
063        boolean isLogging(Level level);
064        /**
065         * Log a warning message.
066         * @param message
067         */
068        void warn(final String message);
069
070        /**
071         * Log a trace message.
072         * @param message
073         */
074        void trace(final String message);
075
076        /**
077         * Log a debug message.
078         * @param message
079         */
080        void debug(final String message);
081
082        /**
083         * Log an info message.
084         * @param message
085         */
086        void info(final String message);
087        /**
088         * Log an error message.
089         * @param message
090         */
091        void error(final String message);
092
093        /**
094         * Log an error message and exception.
095         * @param message
096         * @param e
097         */
098        void error(final String message, Exception e);
099
100        /**
101         * @param name
102         * @return
103         */
104
105}