#include <new_sim_log.h>
Collaboration diagram for NewSimulatorLog:
Public Member Functions | |
NewSimulatorLog () | |
Constructor. | |
virtual | ~NewSimulatorLog () |
Destructor. | |
bool | Open (int properties, const char *filename="", int max_log_files=1) |
Open logfile(s). | |
void | Close () |
Close logfile(s). | |
void | Lock () |
Set a lock. | |
void | Unlock () |
Unset a lock. | |
void | Hex (bool hex=true) |
Set/Unset hex flag. | |
bool | IsHex () |
Is the hex flag set. | |
void | Time (bool t=true) |
Set/Unset time flag. | |
bool | WithTime () |
Is the time flag set. | |
void | Recursive (bool r) |
Set/Unset recursive flag. | |
bool | IsRecursive () |
Is the recursive flag set. | |
NewSimulatorLog & | operator<< (bool b) |
Output operator definition for a bool value. | |
NewSimulatorLog & | operator<< (unsigned char c) |
Output operator definition for a unsigned char value. | |
NewSimulatorLog & | operator<< (int i) |
Output operator definition for a int value. | |
NewSimulatorLog & | operator<< (unsigned int i) |
Output operator definition for a unsigned int value. | |
NewSimulatorLog & | operator<< (long l) |
Output operator definition for a long value. | |
NewSimulatorLog & | operator<< (double d) |
Output operator definition for a double value. | |
NewSimulatorLog & | operator<< (const char *str) |
Output operator definition for a string. | |
void | Log (const char *fmt,...) |
Writes a complete log entry. | |
void | Hex (const unsigned char *data, int size) |
Writes hex entries. | |
void | Begin (const char *section, const char *name) |
Mark a section inside the logfile. | |
void | End () |
End a section inside the logfile. | |
NewSimulatorLog & | Entry (const char *entry) |
Writes an entry and returns address of object. | |
Protected Member Functions | |
void | Start () |
Start the logfile writing. | |
void | Output (const char *str) |
Write the output dependent on which flags are set. | |
Protected Attributes | |
cThreadLock | m_lock |
Thread lock. | |
int | m_lock_count |
count of locks | |
int | m_open_count |
count of open files | |
bool | m_hex |
flag if hex values are written | |
bool | m_time |
flag if time should be written | |
bool | m_recursive |
flag recursive | |
bool | m_std_out |
flag if output should be on stdout | |
bool | m_std_err |
flag if output should be on stderr | |
bool | m_nl |
flag for newline | |
FILE * | m_fd |
file handler |
|
Mark a section inside the logfile.
|
|
Writes an entry and returns address of object.
|
|
Writes hex entries.
|
|
Set/Unset hex flag.
|
|
Open logfile(s).
|
|
Write the output dependent on which flags are set.
|
|
Set/Unset recursive flag.
|
|
Set/Unset time flag.
|