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 415 of file log.h.
◆ AgentLogImpl() [1/2]
AgentLogImpl::AgentLogImpl |
( |
FILE * |
fp = 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() [2/2]
AgentLogImpl::AgentLogImpl |
( |
const char * |
fname | ) |
|
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::~AgentLogImpl |
( |
| ) |
|
◆ create_log_entry()
virtual LogEntry* AgentLogImpl::create_log_entry |
( |
const char *const |
name, |
|
|
unsigned char |
t |
|
) |
| 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.
◆ operator+=()
Add a LogEntry to the receiver Log.
- Parameters
-
- Returns
- The receiver log itself.
Implements AgentLog.
◆ set_dest() [1/2]
void AgentLogImpl::set_dest |
( |
const char * |
fname | ) |
|
Set destination of logs to a given file.
- Parameters
-
fname | - A file name. "" directs logs to stdout. |
◆ set_dest() [2/2]
void AgentLogImpl::set_dest |
( |
FILE * |
fp | ) |
|
Set destination of logs to a given file.
- Parameters
-
fp | - A pointer to an open file. 0 directs logs to stdout. |
◆ close_needed
bool AgentLogImpl::close_needed |
|
protected |
◆ logfile
FILE* AgentLogImpl::logfile |
|
protected |
The documentation for this class was generated from the following file: