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.
serenity::experimental::RotateSettings Struct Reference

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).
 

Public Attributes

bool rotateOnFileSize { true }
 Determines if file size rotation is enabled/disabled.
 
size_t maxNumberOfFiles { 5 }
 This can be any arbitrary number - determines how many files to create and rotate through.
 
size_t fileSizeLimit { 512 * KB }
 The upper limit of what the size each file should be before rotating to a new file.
 

Detailed Description

This struct is in charge of the rotation settings for the RotateTarget class. Currently, this only involves file size based rotation settings

Member Function Documentation

◆ SetOriginalSettings()

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

Parameters
filePath

The full path to the file. This path can be an absolute or relative path.


The documentation for this struct was generated from the following files: