mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-24 09:35:40 +08:00
Add VERSION to STDERR and log messages that output the string MMDVMHost
They now output the string MMDVMHost-yyymmdd a) for completeness and; b) to quickly output the version number by calling the host executable with no arguments so Kim can easily grab it for his dashboard. I did think about a -v|--version argument, but this was much simpler for the purpose.
This commit is contained in:
@@ -128,13 +128,13 @@ int CMMDVMHost::run()
|
|||||||
{
|
{
|
||||||
bool ret = m_conf.read();
|
bool ret = m_conf.read();
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
::fprintf(stderr, "MMDVMHost: cannot read the .ini file\n");
|
::fprintf(stderr, "MMDVMHost-%s: cannot read the .ini file\n", VERSION);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ::LogInitialise(m_conf.getLogFilePath(), m_conf.getLogFileRoot(), m_conf.getLogFileLevel(), m_conf.getLogDisplayLevel());
|
ret = ::LogInitialise(m_conf.getLogFilePath(), m_conf.getLogFileRoot(), m_conf.getLogFileLevel(), m_conf.getLogDisplayLevel());
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
::fprintf(stderr, "MMDVMHost: unable to open the log file\n");
|
::fprintf(stderr, "MMDVMHost-%s: unable to open the log file\n", VERSION);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ int CMMDVMHost::run()
|
|||||||
|
|
||||||
setMode(MODE_IDLE);
|
setMode(MODE_IDLE);
|
||||||
|
|
||||||
LogMessage("MMDVMHost is running");
|
LogMessage("MMDVMHost-%s is running", VERSION);
|
||||||
|
|
||||||
while (!m_killed) {
|
while (!m_killed) {
|
||||||
bool lockout = m_modem->hasLockout();
|
bool lockout = m_modem->hasLockout();
|
||||||
@@ -554,7 +554,7 @@ int CMMDVMHost::run()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LogMessage("MMDVMHost is exiting on receipt of SIGHUP1");
|
LogMessage("MMDVMHost-%s is exiting on receipt of SIGHUP1", VERSION);
|
||||||
|
|
||||||
setMode(MODE_IDLE);
|
setMode(MODE_IDLE);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user