A class for managing log messages.
More...
#include <BCLog.h>
List of all members.
Public Types |
enum | LogLevel {
debug,
detail,
summary,
warning,
error,
nothing
} |
Public Member Functions |
| BCLog () |
| ~BCLog () |
Static Public Member Functions |
static void | CloseLog () |
static int | GetHIndex () |
static BCLog::LogLevel | GetLogLevelFile () |
static BCLog::LogLevel | GetLogLevelScreen () |
static const char * | GetVersion () |
static bool | IsOpen () |
static void | OpenLog () |
static void | OpenLog (const char *filename, BCLog::LogLevel loglevelfile, BCLog::LogLevel loglevelscreen) |
static void | OpenLog (const char *filename) |
static void | Out (BCLog::LogLevel loglevelfile, BCLog::LogLevel loglevelscreen, const char *message) |
static void | Out (const char *message) |
static void | Out (BCLog::LogLevel loglevel, const char *message) |
static void | OutDebug (const char *message) |
static void | OutDetail (const char *message) |
static void | OutError (const char *message) |
static void | OutSummary (const char *message) |
static void | OutWarning (const char *message) |
static void | SetLogLevel (BCLog::LogLevel loglevel) |
static void | SetLogLevelFile (BCLog::LogLevel loglevel) |
static void | SetLogLevelScreen (BCLog::LogLevel loglevel) |
static void | StartupInfo () |
Static Private Member Functions |
static const char * | ToString (BCLog::LogLevel) |
Static Private Attributes |
static bool | fFirstOutputDone = false |
static int | fHindex = 0 |
static BCLog::LogLevel | fMinimumLogLevelFile = BCLog::debug |
static BCLog::LogLevel | fMinimumLogLevelScreen = BCLog::summary |
static std::ofstream | fOutputStream |
static const char * | fVersion = VERSION |
Detailed Description
A class for managing log messages.
- Author:
- Daniel Kollar
-
Kevin Kröninger
- Version:
- 1.0
- Date:
- 08.2008 This class manages log messages for printing on the screen and into a log file
Definition at line 28 of file BCLog.h.
Member Enumeration Documentation
Enumerator for the amount of details to put into the log file Log levels: debug : Lowest level of information detail : Details of functions, etc. summary : Results warning : Warning messages error : Error message nothing : No output
- Enumerator:
debug |
|
detail |
|
summary |
|
warning |
|
error |
|
nothing |
|
Definition at line 44 of file BCLog.h.
{debug, detail, summary, warning, error, nothing};
Constructor & Destructor Documentation
Constructor.
Definition at line 33 of file BCLog.cxx.
{
gErrorIgnoreLevel=2000;
}
Member Function Documentation
void BCLog::CloseLog |
( |
|
) |
[static] |
Closes the log file
Definition at line 90 of file BCLog.cxx.
static int BCLog::GetHIndex |
( |
|
) |
[inline, static] |
- Returns:
- unique number for use in histogram name string
Definition at line 149 of file BCLog.h.
Returns the minimum log level for file output.
- Returns:
- log level
Definition at line 61 of file BCLog.h.
Returns the minimum log level for screen output.
- Returns:
- log level
Definition at line 67 of file BCLog.h.
static const char* BCLog::GetVersion |
( |
|
) |
[inline, static] |
- Returns:
- string containing the version number
Definition at line 144 of file BCLog.h.
bool BCLog::IsOpen |
( |
|
) |
[static] |
- Returns:
- true if log file is open or false if not.
Definition at line 83 of file BCLog.cxx.
void BCLog::OpenLog |
( |
|
) |
[static] |
Opens log file and sets minimum log levels for file and screen output.
- Parameters:
-
| filename | log filename |
| loglevelfile | minimum log level for file output |
| loglevelscreen | minimum log level for screen output |
Definition at line 46 of file BCLog.cxx.
void BCLog::OpenLog |
( |
const char * |
filename |
) |
[static] |
void BCLog::Out |
( |
const char * |
message |
) |
[static] |
static void BCLog::Out |
( |
BCLog::LogLevel |
loglevel, |
|
|
const char * |
message | |
|
) |
| | [inline, static] |
Definition at line 120 of file BCLog.h.
{ Out(loglevel,loglevel,message); };
static void BCLog::OutDebug |
( |
const char * |
message |
) |
[inline, static] |
static void BCLog::OutDetail |
( |
const char * |
message |
) |
[inline, static] |
static void BCLog::OutError |
( |
const char * |
message |
) |
[inline, static] |
static void BCLog::OutSummary |
( |
const char * |
message |
) |
[inline, static] |
static void BCLog::OutWarning |
( |
const char * |
message |
) |
[inline, static] |
static void BCLog::SetLogLevel |
( |
BCLog::LogLevel |
loglevel |
) |
[inline, static] |
Sets the minimum log level for file and screen output.
- Parameters:
-
Definition at line 87 of file BCLog.h.
static void BCLog::SetLogLevelFile |
( |
BCLog::LogLevel |
loglevel |
) |
[inline, static] |
Sets the minimum log level for file output.
- Parameters:
-
Definition at line 75 of file BCLog.h.
static void BCLog::SetLogLevelScreen |
( |
BCLog::LogLevel |
loglevel |
) |
[inline, static] |
Sets the minimum log level for screen output.
- Parameters:
-
Definition at line 81 of file BCLog.h.
void BCLog::StartupInfo |
( |
|
) |
[static] |
Writes startup information onto screen and into a logfile
Definition at line 125 of file BCLog.cxx.
const char * BCLog::ToString |
( |
BCLog::LogLevel |
loglevel |
) |
[static, private] |
Converts a log level to a string
Definition at line 148 of file BCLog.cxx.
{
switch (loglevel)
{
case debug:
return "Debug ";
case detail:
return "Detail ";
case summary:
return "Summary";
case warning:
return "Warning";
case error:
return "Error ";
default:
return "";
}
}
Member Data Documentation
Specifies wheather there were output printouts already
Definition at line 172 of file BCLog.h.
Global histogram counter
Definition at line 180 of file BCLog.h.
The minimum file log level
Definition at line 160 of file BCLog.h.
The minimum screen log level
Definition at line 164 of file BCLog.h.
The output stream for the file log
Definition at line 168 of file BCLog.h.
BAT version number
Definition at line 150 of file BCLog.h.
The documentation for this class was generated from the following files: