|
pstore2
|
#include <rotating_log.hpp>


Public Member Functions | |
| basic_rotating_log (std::string base_name, std::streamoff max_bytes, unsigned num_backups, StreamTraits const &traits=StreamTraits(), FileSystemTraits const &fs_traits=FileSystemTraits()) | |
| basic_rotating_log (basic_rotating_log const &)=delete | |
| basic_rotating_log (basic_rotating_log &&)=delete | |
| basic_rotating_log & | operator= (basic_rotating_log const &)=delete |
| basic_rotating_log & | operator= (basic_rotating_log &&) noexcept=delete |
| void | log_impl (std::string const &message) override |
| Writes the supplied string to the log. More... | |
| bool | is_open () const |
| (for testing) | |
| StreamTraits & | stream_traits () |
| FileSystemTraits & | file_system_traits () |
| StreamTraits::stream_type & | stream () |
Public Member Functions inherited from pstore::basic_logger | |
| void | log (priority p, std::string const &message) final |
Public Member Functions inherited from pstore::logger | |
| logger (logger const &)=delete | |
| logger (logger &&) noexcept=delete | |
| logger & | operator= (logger const &)=delete |
| logger & | operator= (logger &&) noexcept=delete |
| void | set_priority (priority const p) noexcept |
| priority | get_priority () const noexcept |
| virtual void | log (priority p, gsl::czstring message, int d) |
| virtual void | log (priority p, gsl::czstring message, unsigned d) |
| virtual void | log (priority p, gsl::czstring message, long d) |
| virtual void | log (priority p, gsl::czstring message, unsigned long d) |
| virtual void | log (priority p, gsl::czstring message, long long d) |
| virtual void | log (priority p, gsl::czstring message, unsigned long long d) |
| virtual void | log (priority p, gsl::czstring message) |
| virtual void | log (priority p, gsl::czstring part1, gsl::czstring part2) |
| virtual void | log (priority p, gsl::czstring part1, quoted part2) |
| void | log (priority const p, gsl::czstring const message, std::string const &d) |
Additional Inherited Members | |
Public Types inherited from pstore::logger | |
| enum | priority { priority::emergency, priority::alert, priority::critical, priority::error, priority::warning, priority::notice, priority::info, priority::debug } |
Static Public Member Functions inherited from pstore::basic_logger | |
| static gsl::czstring | priority_string (priority p) noexcept |
| static std::string | get_current_thread_name () |
| static std::size_t | time_string (std::time_t t, gsl::span< char, time_buffer_size > const &buffer) |
Static Public Attributes inherited from pstore::basic_logger | |
| static constexpr std::size_t const | time_buffer_size = sizeof "YYYY-MM-DDTHH:mm:SS+ZZZZ" |
| StreamTraits | A structure which must:
|
| FileSystemTraits | A structure which must:
|
| pstore::basic_rotating_log< StreamTraits, FileSystemTraits >::basic_rotating_log | ( | std::string | base_name, |
| std::streamoff | max_bytes, | ||
| unsigned | num_backups, | ||
| StreamTraits const & | traits = StreamTraits (), |
||
| FileSystemTraits const & | fs_traits = FileSystemTraits () |
||
| ) |
| base_name | The base file name to which an integer is appended for backup files. |
| max_bytes | The maximum number of bytes to which an active log file is allowed to grow before we perform a rotation and begin writing that a new file. Set to 0 to allow the size to be unlimited (implying that rotation will never occur). |
| num_backups | The number of backup files to created and rotated. Set to 0 to cause no backups to be made. |
| traits | The stream traits to be associated with the log. |
| fs_traits | The file-system traits to be associated with the log. |
|
overridevirtual |
Writes the supplied string to the log.
If the current log file would become too large (as defined by the max_bytes constructor parameter), then a rotation is performed.
Implements pstore::basic_logger.
1.8.13