#include <Logger.h>
|
enum | Level {
NONE,
ERROR,
WARNING,
MESSAGE,
DEBUG,
DEBUG1,
DEBUG2,
DEBUG3,
ALL,
MIN = NONE,
MAX = ALL
} |
|
A logging system used for logging different kinds of messages to a ByteSink .
An enumeration of all levels at which this Logger may be elevated to . Lower levels are reserved for more severe messages .
Constructs a new Logger which writes to a specified ByteSink and logs at a particular logging Level .
- Parameters
-
sink | The ByteSink that this Logger will begin writing to. |
initialLevel | The Level that this Logger will begin writing at. |
void MFM::Logger::Debug |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Logs a formatted message at the DEBUG logging Level .
- Parameters
-
format | The format string used to parse the variadic arguments which follow it. |
void MFM::Logger::Error |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Logs a formatted message at the ERROR logging Level .
- Parameters
-
format | The format string used to parse the variadic arguments which follow it. |
Level MFM::Logger::GetLevel |
( |
| ) |
const |
|
inline |
Gets the current Level that this Logger is operating at .
- Returns
- The current Level that this Logger is operating at .
bool MFM::Logger::IfLog |
( |
Level |
level | ) |
|
|
inline |
Checks to see if this Logger is operating at a higher Level than a specified one.
- Parameters
-
level | The Level used to test the elevation of this Logger . |
- Returns
true
if this Logger is operating on some level higher than level
, else false
.
bool MFM::Logger::Log |
( |
Level |
level, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Logs a formatted message at a specified logging Level .
- Parameters
-
level | The logging Level to log this message at. |
format | The format string used to parse the variadic arguments which follow it. |
- Returns
true
.
void MFM::Logger::Message |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Logs a formatted message at the MESSAGE logging Level .
- Parameters
-
format | The format string used to parse the variadic arguments which follow it. |
Sets the ByteSink that this Logger will begin writing to.
- Parameters
-
- Returns
- A pointer to the ByteSink that this Logger was writing to before this method was called.
Level MFM::Logger::SetLevel |
( |
u32 |
newLevel | ) |
|
|
inline |
Sets the Level that this Logger will operate at by specifying the number of the level to be set.
- Parameters
-
newLevel | the number of the Level to set this Logger to. This FAILs with ILLEGAL_ARGUMENT if this is not a valid Level number. |
- Returns
- the Level that this Logger was operating at before this method was called.
Sets the Level that this Logger will operate at.
- Parameters
-
newLevel | The Level that this Logger will operate at. This FAILs with ILLEGAL_ARGUMENT if this is not a valid Level . |
- Returns
- the Level that this Logger was operating at before this method was called.
Sets the Time Stamper to be used by this Logger , a device used to keep track of the number of messages that have been logged.
- Parameters
-
stamper | The ByteSerializable that will be printed as a prefix to each logging message. |
static const char* MFM::Logger::StrLevel |
( |
Level |
l | ) |
|
|
inlinestatic |
Translates a Level to an immutable string .
- Parameters
-
l | The level to translate to a string . |
- Returns
- The string which represents
l
.
static bool MFM::Logger::ValidLevel |
( |
s32 |
levelNumber | ) |
|
|
inlinestatic |
Checks to see if a specified level number represents a Level in this Logger .
- Parameters
-
levelNumber | The number of the level to check for validity . |
- Returns
true
if levelNumber
represents a valid logging Level .
void MFM::Logger::Vreport |
( |
Level |
level, |
|
|
const char * |
format, |
|
|
va_list & |
ap |
|
) |
| |
|
inline |
Logs a formatted message at a specified logging level .
- Parameters
-
level | The logging Level to log this message at. |
format | The format string used to parse the variadic argument list . |
ap | The variadic argument list describing the message to be logged. |
void MFM::Logger::Warning |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
inline |
Logs a formatted message at the WARNING logging Level .
- Parameters
-
format | The format string used to parse the variadic arguments which follow it. |
The documentation for this class was generated from the following file: