|
PTLib
Version 2.14.3
|
Information on how to rotate log files. More...
#include <syslog.h>

Public Member Functions | |
| RotateInfo (const PDirectory &dir) | |
| bool | CanRotate () const |
Public Attributes | |
| PDirectory | m_directory |
| Destination directory for rotated file, default to same s log file. More... | |
| PFilePathString | m_prefix |
| File name prefix, default PProcess::GetName() More... | |
| PString | m_timestamp |
| Time template for rotated file, default "_yyyy_MM_dd_hh_mm". More... | |
| PFilePathString | m_suffix |
| File name suffix, default ".log". More... | |
| off_t | m_maxSize |
| Size in bytes which triggers a rotation, default zero disables. More... | |
| unsigned | m_maxFileCount |
| When this many files have been rotated, oldest is deleted. More... | |
| PTimeInterval | m_maxFileAge |
| Rotated files older than this are deleted. More... | |
Information on how to rotate log files.
The system will generate a new file path via m_directory + m_prefix + PTime::AsString(m_timeTemplate) + m_suffix which is used with renaming/moving the log file.
The string m_directory + m_prefix + '*' + m_suffix is used to determine the files to remove.
| PSystemLogToFile::RotateInfo::RotateInfo | ( | const PDirectory & | dir | ) |
|
inline |
References PString::IsEmpty(), m_maxSize, and m_timestamp.
| PDirectory PSystemLogToFile::RotateInfo::m_directory |
Destination directory for rotated file, default to same s log file.
| PTimeInterval PSystemLogToFile::RotateInfo::m_maxFileAge |
Rotated files older than this are deleted.
| unsigned PSystemLogToFile::RotateInfo::m_maxFileCount |
When this many files have been rotated, oldest is deleted.
| off_t PSystemLogToFile::RotateInfo::m_maxSize |
Size in bytes which triggers a rotation, default zero disables.
Referenced by CanRotate().
| PFilePathString PSystemLogToFile::RotateInfo::m_prefix |
File name prefix, default PProcess::GetName()
| PFilePathString PSystemLogToFile::RotateInfo::m_suffix |
File name suffix, default ".log".
| PString PSystemLogToFile::RotateInfo::m_timestamp |
Time template for rotated file, default "_yyyy_MM_dd_hh_mm".
Referenced by CanRotate().