Core/Log: Allow configuring a maximum file size for a log file. If the file size is about to be exceeded, the core will create a new file titled <oldname>_.log and start outputting there.

This commit is contained in:
Machiavelli committed 2013-01-23 17:48:17 +01:00
1 parent 5e367c910a
commit 39c2d892f3
5 files changed
+43 -5

No files matched your search

+3 -1
View File
@@ -23,7 +23,7 @@
class AppenderFile: public Appender
{
public:
AppenderFile(uint8 _id, std::string const& _name, LogLevel level, const char* filename, const char* logDir, const char* mode, AppenderFlags flags);
AppenderFile(uint8 _id, std::string const& _name, LogLevel level, const char* filename, const char* logDir, const char* mode, AppenderFlags flags, uint64 maxSize);
~AppenderFile();
FILE* OpenFile(std::string const& _name, std::string const& _mode, bool _backup);
@@ -35,6 +35,8 @@ class AppenderFile: public Appender
std::string mode;
bool dynamicName;
bool backup;
uint64 _maxFileSize;
uint64 _fileSize;
};
#endif