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::BackgroundThread Struct Reference

Struct that holds the specific variables in charge of the background flush thread in file targets. More...

Public Attributes

std::atomic< bool > cleanUpThreads { false }
 Cleans up the flush thread when interval based flushing is disabled or when the program ends.
 
std::atomic< bool > flushThreadEnabled { false }
 naive guard to protect from always taking the mutex lock when the flush thread isn't active
 
std::mutex readWriteMutex
 protects the file during reads to write to disk and writing to the file handle
 
std::thread flushThread
 Involved in initializing and running the background thread.
 

Detailed Description

This struct is in charge of initializing and cleaning up the flush thread background worker, protecting the file during reads/writes, and providing a naive guard against always taking a lock on the file


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