A logger that outputs messages to a file.
More...
#include <Console.hh>
A logger that outputs messages to a file.
gazebo::common::FileLogger::FileLogger |
( |
const std::string & |
_filename = "" | ) |
|
Constructor.
- Parameters
-
[in] | _filename | Filename to write into. If empty, FileLogger::Init must be called separately. |
virtual gazebo::common::FileLogger::~FileLogger |
( |
| ) |
|
|
virtual |
std::string gazebo::common::FileLogger::GetLogDirectory |
( |
| ) |
const |
Get the full path of the directory where all the log files are stored.
- Returns
- Full path of the directory.
void gazebo::common::FileLogger::Init |
( |
const std::string & |
_prefix, |
|
|
const std::string & |
_filename |
|
) |
| |
Initialize the file logger.
- Parameters
-
[in] | _prefix | Prefix added to the directory where the log file will be created. |
[in] | _filename | Name and path of the log file to write output into. |
virtual FileLogger& gazebo::common::FileLogger::operator() |
( |
| ) |
|
|
virtual |
Output a filename and line number, then return a reference to the logger.
- Returns
- Reference to this logger.
virtual FileLogger& gazebo::common::FileLogger::operator() |
( |
const std::string & |
_file, |
|
|
int |
_line |
|
) |
| |
|
virtual |
Output a filename and line number, then return a reference to the logger.
- Parameters
-
[in] | _file | Filename to output. |
[in] | _line | Line number in the _file. |
- Returns
- Reference to this logger.
The documentation for this class was generated from the following file: