Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

Logger.hpp File Reference

#include <fstream>
#include <iostream>
#include <sstream>
#include <vector>
#include <map>
#include <pthread.h>
#include "Benzene.hpp"

Go to the source code of this file.

Classes

class  Logger
 Logger supporting message levels and multiple output streams received from multiple threads. More...
struct  Logger::ThreadBuffer
 Buffer for a thread of execution. More...

Namespaces

namespace  LogLevelUtil
 

Utilities on LogLevel.


Enumerations

enum  LogLevel {
  LOG_LEVEL_OFF = 65536, LOG_LEVEL_SEVERE = 1000, LOG_LEVEL_WARNING = 900, LOG_LEVEL_INFO = 800,
  LOG_LEVEL_CONFIG = 700, LOG_LEVEL_FINE = 500, LOG_LEVEL_FINER = 300, LOG_LEVEL_ALL = 0
}
 

Levels for messages to a Logger object.

More...

Functions

bool LogLevelUtil::IsValidLevel (LogLevel level)
 Returns true if the given level is valid.
std::string LogLevelUtil::toString (LogLevel level)
 Returns a string representation of the level.
LogLevel LogLevelUtil::fromString (std::string)
 Converts a string to a LogLevel.
LoggerLogFine ()
 Sets global logger to LOG_LEVEL_FINE.
LoggerLogConfig ()
 Similar to LogFine().
LoggerLogInfo ()
 Similar to LogFine().
LoggerLogWarning ()
 Similar to LogFine().
LoggerLogSevere ()
 Similar to LogFine().

Detailed Description

Definition in file Logger.hpp.


Enumeration Type Documentation

enum LogLevel

Levels for messages to a Logger object.

Enumerator:
LOG_LEVEL_OFF 

All messages with levels higher than OFF are ignored.

LOG_LEVEL_SEVERE 

Message level indicating a serious failure.

In general a severe message should describe events of considerable importance which will prevent normal program execution.

LOG_LEVEL_WARNING 

Message level indicating a potential problem.

Should be used to describe events of interest to users and developers.

LOG_LEVEL_INFO 

Message level for informational messages.

Messages of this level or higher are typically output on the console.

LOG_LEVEL_CONFIG 

Message level for configuration purposes.

Should be used to provide a variety of static configuration information to assist in debugging.

LOG_LEVEL_FINE 

Message level providing tracing information.

LOG_LEVEL_FINER 

Message level providing more tracing information.

LOG_LEVEL_ALL 

Special level indicating that all messages should be logged.

Definition at line 22 of file Logger.hpp.


Function Documentation

Logger& LogConfig (  )  [inline]
Logger& LogFine (  )  [inline]
Logger& LogInfo (  )  [inline]

Similar to LogFine().

Definition at line 190 of file Logger.hpp.

References Logger::Global(), LOG_LEVEL_INFO, and Logger::SetLevel().

Referenced by VCBuilder::andClosure(), BookCheck::BestMove(), HexAbSearch::CheckAbort(), DfsSolver::CheckAbort(), DfpnSolver::CheckAbort(), BenzenePlayer::CheckEndgame(), BookCommands::CmdBookDumpPolarizedLeafs(), BenzeneHtpEngine::CmdEncodePattern(), HexHtpEngine::CmdExec(), DfpnCommands::CmdFindWinning(), DfsCommands::CmdSolverFindWinning(), DfsCommands::CmdSolveState(), HexUctState::ComputeKnowledge(), HexThreadStateFactory::Create(), BookBuilder< PLAYER >::CreateWorkers(), BookBuilder< PLAYER >::DestroyWorkers(), DfsSolver::DumpStats(), BookBuilder< PLAYER >::FlushBook(), HexUctState::GenerateAllMoves(), PlayAndSolve::GenMove(), BenzenePlayer::GenMove(), BookUtil::ImportSolvedStates(), BenzenePlayer::InitSearch(), BookUtil::InverseEval(), HexUctSharedPolicy::LoadPlayPatterns(), PlayAndSolve::SolverThread::operator()(), PlayAndSolve::PlayerThread::operator()(), BookBuilder< PLAYER >::Worker::operator()(), CacheBook::ParseFile(), MoHexPlayer::PerformPreSearch(), SwapCheck::PlaySwap(), BookBuilder< PLAYER >::PrintMessage(), MoHexPlayer::PrintParameters(), DfpnSolver::PrintStatistics(), WolvePlayer::Search(), PerfectPlayer::Search(), MoHexPlayer::Search(), HexAbSearch::Search(), HandicapPlayer::Search(), GameUtil::SequenceFromPosition(), DfsSolver::Solve(), DfsSolver::SolveState(), BookBuilder< PLAYER >::StartIteration(), HexUctState::StartSearch(), DfpnSolver::StartSearch(), and MoHexPlayer::TryReuseSubtree().

Logger& LogSevere (  )  [inline]
Logger& LogWarning (  )  [inline]


6 Jan 2011 Doxygen 1.6.3