Log functor class Used for logging information to the console.
More...
#include <Log.hpp>
|
static bool | SetFile (std::string path) |
| sets the current logfile More...
|
|
|
std::string | _pre |
| Prefix used when logging.
|
|
std::string | _suf |
| Suffix used when logging.
|
|
bool | _print |
| Determines if calls to operator() are completed.
|
|
|
static int | _line |
| Current line number.
|
|
static std::fstream | _file |
| Output filestream shared across all Log classes.
|
|
Log functor class Used for logging information to the console.
◆ Log()
Aspen::Log::Log::Log |
( |
std::string |
prefix = "" , |
|
|
std::string |
suffix = "" , |
|
|
bool |
print = true |
|
) |
| |
Constructor.
- Parameters
-
prefix | Prefix used when logging |
suffix | Suffix used when logging |
print | Determines if calls to operator() are completed |
◆ operator()() [1/2]
void Aspen::Log::Log::operator() |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
Log request Functions similarly to printf.
- Parameters
-
format | Format string to be passed to vsprintf |
◆ operator()() [2/2]
void Aspen::Log::Log::operator() |
( |
const std::stringstream & |
message | ) |
|
|
inline |
Log request.
- Parameters
-
message | Message to be unwrapped as a string |
◆ SetFile()
static bool Aspen::Log::Log::SetFile |
( |
std::string |
path | ) |
|
|
static |
sets the current logfile
- Parameters
-
- Returns
- Success of opening the output file
The documentation for this class was generated from the following file: