/** * This file is part of Faktotum. * * * Faktotum is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * * Faktotum is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with Faktotum. * * If not, see <http://www.gnu.org/licenses/>. */ package de.romankreisel.faktotum; import java.util.logging.Level; import java.util.logging.Logger; /** * This class is the base class for almost all classes in Faktotum (exceptions * are not based on this class). * * This class also provides a logger-object for its subclasses. * * @author Roman Kreisel <mail@romankreisel.de> */ public abstract class FaktotumObject { private final Logger logger = Logger.getLogger(this.getClass().getName()); /** * Creates an instance of an Object, creates a logger-instance and logs the * instantiation; */ public FaktotumObject() { this.logger.log(Level.FINEST, this.getClass().getName() + " object was instantiated"); } /** * A logger for this class type * * @return the logger instance for this class */ protected Logger getLogger() { return this.logger; } }