mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-08-03 01:15:41 -07:00
add checkbox option to clear log (#2963)
This commit is contained in:
@@ -21,9 +21,13 @@ Logger::~Logger()
|
||||
void Logger::logToFile(bool enabled)
|
||||
{
|
||||
if (enabled)
|
||||
{
|
||||
openLogfileSession();
|
||||
}
|
||||
else
|
||||
{
|
||||
closeLogfileSession();
|
||||
}
|
||||
}
|
||||
|
||||
QString Logger::getClientVersion()
|
||||
@@ -34,7 +38,9 @@ QString Logger::getClientVersion()
|
||||
void Logger::openLogfileSession()
|
||||
{
|
||||
if (logToFileEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
fileHandle.setFileName(LOGGER_FILENAME);
|
||||
fileHandle.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text);
|
||||
|
||||
Reference in New Issue
Block a user