Skip to content

Commit

Permalink
feat: Minor log improvements
Browse files Browse the repository at this point in the history
- additional logs
- don't print log location when unknown
  • Loading branch information
pktiuk authored Sep 22, 2021
2 parents 7a9ec69 + 0b09af2 commit b699f09
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/joytabwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,7 @@ void JoyTabWidget::loadConfigFile(QString fileLocation)
configBox->setCurrentIndex(searchIndex);
emit joystickConfigChanged(m_joystick->getJoyNumber());
}
qDebug() << "Config file loaded";
}
}
}
Expand Down
9 changes: 6 additions & 3 deletions src/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,12 @@ void Logger::logMessage(const QString &message, const Logger::LogLevel level, co
*outputStream << TYPE_NAMES[level] << "\t" << finalMessage;

if (extendedLogs)
*outputStream << " (file " << filename.mid(7) << ":" << lineno << ")\n";
else
*outputStream << "\n";
{
if (lineno != 0)
*outputStream << " (file " << filename.mid(7) << ":" << lineno << ")";
}

*outputStream << "\n";
outputStream->flush();
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ int main(int argc, char *argv[])
}
settings.importFromCommandLine(cmdutility);
settings.applySettingsToLogger(cmdutility, appLogger);
qDebug() << "AntiMicroX version: " << PadderCommon::programVersion;

Q_INIT_RESOURCE(resources);

Expand Down

0 comments on commit b699f09

Please sign in to comment.