001/*
002 * $Id: NoOpLogger.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: Bruno Lowagie, Paulo Soares, 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 Public License version 3 as published by
009 * the Free Software Foundation with the addition of the following permission
010 * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED
011 * WORK IN WHICH THE COPYRIGHT IS OWNED BY 1T3XT, 1T3XT DISCLAIMS THE WARRANTY
012 * OF NON 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 Public License for more
017 * details. You should have received a copy of the GNU Affero General Public
018 * License along with this program; if not, see http://www.gnu.org/licenses or
019 * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
020 * Boston, 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 Public License.
026 *
027 * In accordance with Section 7(b) of the GNU Affero General Public License, a
028 * covered 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 * The no-operation logger, it does nothing with the received logging
045 * statements. And returns false by default for {@link NoOpLogger#isLogging(Level)}
046 *
047 * @author redlab_b
048 *
049 */
050public final class NoOpLogger implements Logger {
051
052        /* (non-Javadoc)
053         * @see com.itextpdf.text.log.Logger#getLogger(java.lang.Class)
054         */
055        public Logger getLogger(final Class<?> name) {
056                return this;
057        }
058
059        /* (non-Javadoc)
060         * @see com.itextpdf.text.log.Logger#warn(java.lang.String)
061         */
062        public void warn(final String message) {
063        }
064
065        /* (non-Javadoc)
066         * @see com.itextpdf.text.log.Logger#trace(java.lang.String)
067         */
068        public void trace(final String message) {
069        }
070
071        /* (non-Javadoc)
072         * @see com.itextpdf.text.log.Logger#debug(java.lang.String)
073         */
074        public void debug(final String message) {
075        }
076
077        /* (non-Javadoc)
078         * @see com.itextpdf.text.log.Logger#info(java.lang.String)
079         */
080        public void info(final String message) {
081        }
082
083        /* (non-Javadoc)
084         * @see com.itextpdf.text.log.Logger#error(java.lang.String, java.lang.Exception)
085         */
086        public void error(final String message, final Exception e) {
087        }
088
089        /* (non-Javadoc)
090         * @see com.itextpdf.text.log.Logger#isLogging(com.itextpdf.text.log.Level)
091         */
092        public boolean isLogging(final Level level) {
093                return false;
094        }
095
096        /* (non-Javadoc)
097         * @see com.itextpdf.text.log.Logger#error(java.lang.String)
098         */
099        public void error(final String message) {
100        }
101
102        /* (non-Javadoc)
103         * @see com.itextpdf.text.log.Logger#getLogger(java.lang.String)
104         */
105        public Logger getLogger(final String name) {
106                return this;
107        }
108}