17#ifndef _DECAF_UTIL_LOGGING_LOGGER_H_
18#define _DECAF_UTIL_LOGGING_LOGGER_H_
96 std::list<Handler*> handlers;
105 bool useParentHandlers;
109 Logger(
const Logger& );
110 Logger& operator= (
const Logger& );
159 this->parent = parent;
252 return useParentHandlers;
265 this->useParentHandlers = value;
283 virtual void entering(
const std::string& blockName,
284 const std::string& file,
300 virtual void exiting(
const std::string& blockName,
301 const std::string& file,
319 virtual void severe(
const std::string& file,
321 const std::string functionName,
322 const std::string& message );
339 virtual void warning(
const std::string& file,
341 const std::string functionName,
342 const std::string& message );
359 virtual void info(
const std::string& file,
361 const std::string functionName,
362 const std::string& message );
379 virtual void debug(
const std::string& file,
381 const std::string functionName,
382 const std::string& message );
399 virtual void config(
const std::string& file,
401 const std::string functionName,
402 const std::string& message );
419 virtual void fine(
const std::string& file,
421 const std::string functionName,
422 const std::string& message );
439 virtual void finer(
const std::string& file,
441 const std::string functionName,
442 const std::string& message );
459 virtual void finest(
const std::string& file,
461 const std::string functionName,
462 const std::string& message );
485 const std::string functionName,
515 virtual void log(
const Level& level,
const std::string& message );
531 const std::string& file,
533 const std::string& message, ... );
551 const std::string& file,
553 const std::string& message,
Definition Exception.h:38
This class represents an error that has occurred.
Definition Throwable.h:44
A Filter can be used to provide fine grain control over what is logged, beyond the control provided b...
Definition Filter.h:35
A Handler object takes log messages from a Logger and exports them.
Definition Handler.h:49
The Level class defines a set of standard logging levels that can be used to control logging output.
Definition Level.h:56
LogRecord objects are used to pass logging requests between the logging framework and individual log ...
Definition LogRecord.h:41
virtual void log(LogRecord &record)
Log a LogRecord.
void setParent(Logger *parent)
Set the parent for this Logger.
Definition Logger.h:158
virtual void throwing(const std::string &file, const int line, const std::string functionName, const decaf::lang::Throwable &thrown)
Log throwing an exception.
virtual void fine(const std::string &file, const int line, const std::string functionName, const std::string &message)
Log a FINE Level Log.
Logger(const std::string &name)
Creates a new instance of the Logger with the given name.
void setUseParentHandlers(bool value)
Specify whether or not this logger should send its output to it's parent Logger.
Definition Logger.h:264
virtual void debug(const std::string &file, const int line, const std::string functionName, const std::string &message)
Log a DEBUG Level Log.
virtual void log(const Level &level, const std::string &message)
Log a message, with no arguments.
virtual bool isLoggable(const Level &level) const
Check if a message of the given level would actually be logged by this logger.
const std::string & getName() const
Gets the name of this Logger.
Definition Logger.h:136
virtual void finer(const std::string &file, const int line, const std::string functionName, const std::string &message)
Log a FINER Level Log.
const std::list< Handler * > & getHandlers() const
Gets a vector containing all the handlers that this class has been assigned to use.
static Logger * getAnonymousLogger()
Creates an anonymous logger.
const Filter * getFilter() const
Gets the Filter object that this class is using.
Definition Logger.h:214
void removeHandler(Handler *handler)
Removes the specified Handler from this logger, ownership of the Handler pointer is returned to the c...
Level getLevel() const
Get the log Level that has been specified for this Logger.
Definition Logger.h:225
bool getUseParentHandlers() const
Discover whether or not this logger is sending its output to its parent logger.
Definition Logger.h:251
void addHandler(Handler *handler)
Add a log Handler to receive logging messages.
virtual void log(const Level &level, const std::string &file, const int line, const std::string &message, lang::Exception &ex)
Log a message, with associated Throwable information.
virtual void config(const std::string &file, const int line, const std::string functionName, const std::string &message)
Log a CONFIG Level Log.
virtual void info(const std::string &file, const int line, const std::string functionName, const std::string &message)
Log a INFO Level Log.
virtual void finest(const std::string &file, const int line, const std::string functionName, const std::string &message)
Log a FINEST Level Log.
void setFilter(Filter *filter)
Set a filter to control output on this Logger.
virtual void exiting(const std::string &blockName, const std::string &file, const int line)
Logs an Block Exit message.
Logger * getParent() const
Gets the parent of this Logger which will be the nearest existing Logger in this Loggers namespace.
Definition Logger.h:148
virtual void severe(const std::string &file, const int line, const std::string functionName, const std::string &message)
Log a SEVERE Level Log.
static Logger * getLogger(const std::string &name)
Find or create a logger for a named subsystem.
virtual void entering(const std::string &blockName, const std::string &file, const int line)
Logs an Block Enter message.
virtual void log(const Level &levels, const std::string &file, const int line, const std::string &message,...)
Log a message, with the list of params that is formatted into the message string.
virtual void warning(const std::string &file, const int line, const std::string functionName, const std::string &message)
Log a WARN Level Log.
void setLevel(const Level &level)
Set the log level specifying which message levels will be logged by this logger.
Definition Logger.h:242
#define DECAF_API
Definition Config.h:29
Definition ConsoleHandler.h:28
Definition AbstractCollection.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25