#include <Log.h>

Definition at line 23 of file Log.h.
Public Member Functions | |
| Log (bool _show_times=true) | |
| void | open (const String &_fname) |
| Log (const String &fname, bool _show_times=true) | |
| Builds a log object which will dump log lines in the file specified by fname and printing timestamps on each line if _show_times is true. | |
| virtual | ~Log () |
| Log & | operator<< (const String &s) |
| Send string s to the log buffer. | |
| void | flush () |
| Flushes the log line to the log file, this method will be automatically called whenever the xvr2::NL is appended to the log stream. | |
| virtual void | close () |
| void | open (const String &path, bool for_append=false) |
| bool | opened () |
| virtual StdioOutputFile & | operator<< (const Buffer &b) |
| virtual StdioOutputFile & | write (void *data, UInt32 size) |
| virtual StdioOutputFile & | write (const Buffer &data) |
| virtual StdioOutputFile & | write (const String &s) |
| void | seek (FileOffsetT _pos) |
| void | seekEnd () |
| void | seekBegin () |
| void | seekStep (FileOffsetT _step) |
| bool | eof () |
| virtual FileSizeT | size ()=0 |
| virtual FileSizeT | size () |
| virtual FileOffsetT | tell ()=0 |
| virtual FileOffsetT | tell () |
| virtual const char * | getClassName () |
| Returns the name of the current class. | |
| virtual std::string | toString () |
| FILE * | cFILE () const |
Static Public Member Functions | |
| static void | debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
| Will print a debug message to the screen. | |
| static void | debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Protected Member Functions | |
| void | _close () |
| void | _open (const String &fname, const String &mode) |
| bool | _opened () |
| size_t | _read (void *_data, size_t __bytes) |
| size_t | _write (const void *_data, size_t __bytes) |
| void | _seek (FileOffsetT _pos, UInt32 _from) |
Protected Attributes | |
| bool | show_times |
| Wheter to show a timestamp or not in every log line. | |
| std::string | __cls_name |
| FILE * | _fptr |
| FileSizeT | _fsize |
Private Attributes | |
| StringBuffer | ldata |
| Log line internal data. | |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const Object &s) |
| xvr2::Log::Log | ( | bool | _show_times = true |
) |
| xvr2::Log::Log | ( | const String & | fname, | |
| bool | _show_times = true | |||
| ) |
Builds a log object which will dump log lines in the file specified by fname and printing timestamps on each line if _show_times is true.
| virtual xvr2::Log::~Log | ( | ) | [virtual] |
| void xvr2::Log::open | ( | const String & | _fname | ) | [virtual] |
Reimplemented from xvr2::StdioOutputFile.
| void xvr2::Log::flush | ( | ) | [virtual] |
Flushes the log line to the log file, this method will be automatically called whenever the xvr2::NL is appended to the log stream.
Reimplemented from xvr2::StdioInterface.
| virtual void xvr2::Log::close | ( | ) | [virtual] |
Reimplemented from xvr2::StdioOutputFile.
| void xvr2::StdioOutputFile::open | ( | const String & | path, | |
| bool | for_append = false | |||
| ) | [inherited] |
| bool xvr2::StdioOutputFile::opened | ( | ) | [virtual, inherited] |
Implements xvr2::StreamInterface.
| virtual StdioOutputFile& xvr2::StdioOutputFile::operator<< | ( | const Buffer & | b | ) | [virtual, inherited] |
Reimplemented from xvr2::WriteableStream.
| virtual StdioOutputFile& xvr2::StdioOutputFile::write | ( | void * | data, | |
| UInt32 | size | |||
| ) | [virtual, inherited] |
Implements xvr2::WriteableStream.
| virtual StdioOutputFile& xvr2::StdioOutputFile::write | ( | const Buffer & | data | ) | [virtual, inherited] |
Reimplemented from xvr2::WriteableStream.
| virtual StdioOutputFile& xvr2::StdioOutputFile::write | ( | const String & | s | ) | [virtual, inherited] |
Reimplemented from xvr2::WriteableStream.
| void xvr2::StdioOutputFile::seek | ( | FileOffsetT | _pos | ) | [virtual, inherited] |
Reimplemented from xvr2::StdioInterface.
| void xvr2::StdioOutputFile::seekEnd | ( | ) | [virtual, inherited] |
Reimplemented from xvr2::StdioInterface.
| void xvr2::StdioOutputFile::seekBegin | ( | ) | [virtual, inherited] |
Reimplemented from xvr2::StdioInterface.
| void xvr2::StdioOutputFile::seekStep | ( | FileOffsetT | _step | ) | [virtual, inherited] |
Reimplemented from xvr2::StdioInterface.
| bool xvr2::StdioOutputFile::eof | ( | ) | [virtual, inherited] |
Reimplemented from xvr2::StdioInterface.
| virtual FileSizeT xvr2::StreamInterface::size | ( | ) | [pure virtual, inherited] |
Implemented in xvr2::RawOutputStream, xvr2::RawStreamInterface, xvr2::StdioInterface, and xvr2::Net::RawSocketOutputStream.
| virtual FileSizeT xvr2::StdioInterface::size | ( | ) | [virtual, inherited] |
Implements xvr2::StreamInterface.
| virtual FileOffsetT xvr2::StreamInterface::tell | ( | ) | [pure virtual, inherited] |
Implemented in xvr2::RawStreamInterface, and xvr2::StdioInterface.
| virtual FileOffsetT xvr2::StdioInterface::tell | ( | ) | [virtual, inherited] |
Implements xvr2::StreamInterface.
| virtual const char* xvr2::Object::getClassName | ( | ) | [virtual, inherited] |
Returns the name of the current class.
| static void xvr2::Object::debugmsg | ( | Object * | obj, | |
| const char * | msg, | |||
| int | linenumber = __LINE__, |
|||
| const char * | srcfile = __FILE__ | |||
| ) | [static, inherited] |
Will print a debug message to the screen.
| static void xvr2::Object::debugmsgln | ( | Object * | obj, | |
| const char * | msg, | |||
| int | linenumber = __LINE__, |
|||
| const char * | srcfile = __FILE__ | |||
| ) | [static, inherited] |
| virtual std::string xvr2::Object::toString | ( | ) | [virtual, inherited] |
| void xvr2::StdioInterface::_close | ( | ) | [protected, inherited] |
| void xvr2::StdioInterface::_open | ( | const String & | fname, | |
| const String & | mode | |||
| ) | [protected, inherited] |
| bool xvr2::StdioInterface::_opened | ( | ) | [protected, inherited] |
| size_t xvr2::StdioInterface::_read | ( | void * | _data, | |
| size_t | __bytes | |||
| ) | [protected, inherited] |
| size_t xvr2::StdioInterface::_write | ( | const void * | _data, | |
| size_t | __bytes | |||
| ) | [protected, inherited] |
| void xvr2::StdioInterface::_seek | ( | FileOffsetT | _pos, | |
| UInt32 | _from | |||
| ) | [protected, inherited] |
| FILE* xvr2::StdioInterface::cFILE | ( | ) | const [inline, inherited] |
| std::ostream& operator<< | ( | std::ostream & | stream, | |
| const Object & | s | |||
| ) | [friend, inherited] |
StringBuffer xvr2::Log::ldata [private] |
bool xvr2::Log::show_times [protected] |
std::string xvr2::Object::__cls_name [protected, inherited] |
FILE* xvr2::StdioInterface::_fptr [protected, inherited] |
Definition at line 27 of file StdioInterface.h.
Referenced by xvr2::StdioInterface::cFILE(), and xvr2::StdioInterface::StdioInterface().
FileSizeT xvr2::StdioInterface::_fsize [protected, inherited] |
Definition at line 34 of file StdioInterface.h.
Referenced by xvr2::StdioInterface::StdioInterface().
1.5.5