![]() |
Serenity Logger
A very fast and effiecient logging library. This library currently can log to files, rotate files when logging, log to the terminal, and is aware if the terminal is being piped during logging.
|
Struct that holds and controls different rotation settings specific to the RotatingTarget class. More...
Public Member Functions | |
void | SetOriginalSettings (const std::filesystem::path &filePath) |
This function is in charge of caching the file path, its extension, its name, and the log directory. More... | |
void | SetCurrentFileSize (size_t currentSize) |
Sets the variable in charge of tracking current file size of the file context held. | |
const std::filesystem::path & | OriginalPath () |
Returns a reference to the original full file path string. | |
const std::filesystem::path & | OriginalDirectory () |
Returns a reference to the original log directory path string. | |
const std::string & | OriginalName () |
Returns the original base name of the file. | |
const std::string & | OriginalExtension () |
Returns the originnal extension string. | |
const size_t & | FileSize () |
Returns the current size of the file context via the manual tracking method (less expensive). | |
This struct is in charge of the rotation settings for the RotateTarget class. Currently, this only involves file size based rotation settings
void serenity::experimental::RotateSettings::SetOriginalSettings | ( | const std::filesystem::path & | filePath | ) |
If no user log directory is used, the log directory will be the directory where the file should be located.
i.e. If the path was users/desktop/Log.txt, then the log "directory" here would be the desktop location
filePath |
The full path to the file. This path can be an absolute or relative path.