The AgentLogImpl class is an implementation of AgentLog which writes log messages to a file, or to stdout or stderr.
More...
#include <log.h>
|
| static const char * | get_current_time () |
| | Return the current time as a string, using the current default log object. More...
|
| |
The AgentLogImpl class is an implementation of AgentLog which writes log messages to a file, or to stdout or stderr.
- See Also
- LogEntry
- Author
- Frank Fock
- Version
- 3.5f
Definition at line 414 of file log.h.
| AgentLogImpl::AgentLogImpl |
( |
FILE * |
= stdout | ) |
|
Default constructor, with optional pointer to an open log file.
Log is directed to the file if given, otherwise to stdout
- Parameters
-
| fp | - An open log file. 0 implies stdout. |
| AgentLogImpl::AgentLogImpl |
( |
const char * |
| ) |
|
Constructor with file name of a log file.
Log is directed to the given file.
- Parameters
-
| fname | - The file name of a log file. |
| AgentLogImpl::~AgentLogImpl |
( |
| ) |
|
| virtual LogEntry* AgentLogImpl::create_log_entry |
( |
const char *const |
name, |
|
|
unsigned |
char |
|
) |
| const |
|
virtual |
Create a new LogEntry.
- Parameters
-
| name | - The name of the logging module |
| t | - The type of the log entry. |
- Returns
- A new instance of LogEntry (or of a derived class).
Implements AgentLog.
Add a LogEntry to the receiver Log.
- Parameters
-
- Returns
- The receiver log itself.
Implements AgentLog.
| void AgentLogImpl::set_dest |
( |
const char * |
| ) |
|
Set destination of logs to a given file.
- Parameters
-
| fname | - A file name. "" directs logs to stdout. |
| void AgentLogImpl::set_dest |
( |
FILE * |
| ) |
|
Set destination of logs to a given file.
- Parameters
-
| fp | - A pointer to an open file. 0 directs logs to stdout. |
| bool AgentLogImpl::close_needed |
|
protected |
| FILE* AgentLogImpl::logfile |
|
protected |
The documentation for this class was generated from the following file: