FreeNOS
|
Generic logger that writes to a Device object. More...
#include <DeviceLog.h>
Public Member Functions | |
DeviceLog (Device &device) | |
Constructor. More... | |
Public Member Functions inherited from Log | |
Log () | |
Constructor. More... | |
virtual | ~Log () |
Destructor. More... | |
Level | getMinimumLogLevel () |
Get the minimum logging level. More... | |
void | setMinimumLogLevel (Level level) |
Set the minimum logging level. More... | |
void | append (const char *str) |
Append to buffered output. More... | |
void | setIdent (const char *ident) |
Set log identity. More... | |
const char * | getIdent () const |
Retrieve log identify. More... | |
virtual void | terminate () const |
Terminate the program immediately. More... | |
Public Member Functions inherited from WeakSingleton< Log > | |
WeakSingleton (Log *obj) | |
Constructor. More... | |
Protected Member Functions | |
virtual void | write (const char *str) |
Write a string to the Device one character at a time. More... | |
Private Attributes | |
Device & | m_device |
Device instance. More... | |
Additional Inherited Members | |
Public Types inherited from Log | |
enum | Level { Emergency, Alert, Critical, Error, Warning, Notice, Info, Debug } |
Logging level values. More... | |
Static Public Member Functions inherited from WeakSingleton< Log > | |
static Log * | instance () |
Retrieve the instance. More... | |
Generic logger that writes to a Device object.
Definition at line 38 of file DeviceLog.h.
DeviceLog::DeviceLog | ( | Device & | device | ) |
Constructor.
device | Device instance to write log messages to |
Definition at line 23 of file DeviceLog.cpp.
|
protectedvirtual |
Write a string to the Device one character at a time.
str | NUL-terminated string |
Implements Log.
Definition at line 28 of file DeviceLog.cpp.
References FileSystemMessage::action, IOBuffer::bufferedWrite(), String::length(), m_device, FileSystemMessage::size, File::write(), and FileSystem::WriteFile.
|
private |