mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Move debug.txt after it grows too big (#8904)
Before opening the file for writing, its file size is tested. If it exceeds 50 MB, it is moved to debut.txt.1, otherwise the log is appended to the old messages. An old debut.txt.1 is removed if it already exists.
This commit is contained in:
parent
2c9edefde3
commit
36bfc67574
5 changed files with 33 additions and 11 deletions
|
@ -165,7 +165,7 @@ private:
|
|||
|
||||
class FileLogOutput : public ICombinedLogOutput {
|
||||
public:
|
||||
void open(const std::string &filename);
|
||||
void setFile(const std::string &filename, s64 file_size_max);
|
||||
|
||||
void logRaw(LogLevel lev, const std::string &line)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue