List of all members.
Public Member Functions |
| Logfile (const string &filename) |
| constructor
|
| Logfile () |
| default constructor
|
| ~Logfile () |
| destructor
|
void | write (const string &msg, const string file="", const int line=-1) |
| write the string msg as a line in the log file Add a "end of line" character at the end of msg is not required. The method does it by itself
|
void | open (const string &filename) |
| open the file in write mode
|
const bool | is_opened () |
| check if the log file is opened
|
void | close () |
| close the log file
|
Detailed Description
a logging file, that uses the standard fluxes syntax
- Warning:
- the file descriptor to this file is opened during all the "lifetime" of the Logfile object
Constructor & Destructor Documentation
Logfile::Logfile |
( |
const string & |
filename |
) |
|
constructor
- Parameters:
-
| filename | the full name of the logging file to write |
References open().
Member Function Documentation
const bool Logfile::is_opened |
( |
|
) |
|
check if the log file is opened
- Returns:
- true if the log file is opened
Referenced by close(), and write().
void Logfile::open |
( |
const string & |
filename |
) |
|
open the file in write mode
- Parameters:
-
| filename | the full name of the logging file to write |
References close().
Referenced by Logfile().
void Logfile::write |
( |
const string & |
msg, |
|
|
const string |
file = "" , |
|
|
const int |
line = -1 | |
|
) |
| | |
write the string msg as a line in the log file Add a "end of line" character at the end of msg is not required. The method does it by itself
- Parameters:
-
| msg | the message to write |
| file | [optionnal] name of file that is concerned by the message |
| line | [optionnal] line of file that is concerned by the message |
References is_opened().
The documentation for this class was generated from the following files:
- /home/pascal/depot/filedata/src/logfile.h
- /home/pascal/depot/filedata/src/logfile.cpp