AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "AppenderFile.h"
Public Member Functions | |
AppenderFile (uint8 id, std::string const &name, LogLevel level, AppenderFlags flags, std::vector< std::string_view > const &args) | |
~AppenderFile () | |
FILE * | OpenFile (std::string const &name, std::string const &mode, bool backup) |
AppenderType | getType () const override |
Public Member Functions inherited from Appender | |
Appender (uint8 _id, std::string const &name, LogLevel level=LOG_LEVEL_DISABLED, AppenderFlags flags=APPENDER_FLAGS_NONE) | |
virtual | ~Appender () |
uint8 | getId () const |
std::string const & | getName () const |
virtual AppenderType | getType () const =0 |
LogLevel | getLogLevel () const |
AppenderFlags | getFlags () const |
void | setLogLevel (LogLevel) |
void | write (LogMessage *message) |
virtual void | setRealmId (uint32) |
Static Public Attributes | |
static constexpr AppenderType | type = APPENDER_FILE |
Private Member Functions | |
void | CloseFile () |
void | _write (LogMessage const *message) override |
Private Attributes | |
FILE * | logfile |
std::string | _fileName |
std::string | _logDir |
bool | _dynamicName |
bool | _backup |
uint64 | _maxFileSize |
std::atomic< uint64 > | _fileSize |
Additional Inherited Members | |
Static Public Member Functions inherited from Appender | |
static char const * | getLogLevelString (LogLevel level) |
AppenderFile::AppenderFile | ( | uint8 | id, |
std::string const & | name, | ||
LogLevel | level, | ||
AppenderFlags | flags, | ||
std::vector< std::string_view > const & | args | ||
) |
References _backup, _dynamicName, _fileName, _maxFileSize, APPENDER_FLAGS_MAKE_FILE_BACKUP, APPENDER_FLAGS_USE_TIMESTAMP, Appender::flags, logfile, Appender::name, OpenFile(), sLog, and Acore::StringFormat().
AppenderFile::~AppenderFile | ( | ) |
References CloseFile().
|
overrideprivatevirtual |
Implements Appender.
References _backup, _dynamicName, _fileName, _fileSize, _maxFileSize, ACORE_PATH_MAX, logfile, OpenFile(), LogMessage::param1, LogMessage::prefix, LogMessage::Size(), and LogMessage::text.
|
private |
References logfile.
Referenced by OpenFile(), and ~AppenderFile().
|
inlineoverridevirtual |
FILE * AppenderFile::OpenFile | ( | std::string const & | name, |
std::string const & | mode, | ||
bool | backup | ||
) |
References _fileSize, _logDir, CloseFile(), GetEpochTime(), and LogMessage::getTimeStr().
Referenced by _write(), and AppenderFile().
|
private |
Referenced by _write(), and AppenderFile().
|
private |
Referenced by _write(), and AppenderFile().
|
private |
Referenced by _write(), and AppenderFile().
|
private |
Referenced by _write(), and OpenFile().
|
private |
Referenced by OpenFile().
|
private |
Referenced by _write(), and AppenderFile().
|
private |
Referenced by _write(), AppenderFile(), and CloseFile().
|
staticconstexpr |
Referenced by getType().