Skip to content

Commit

Permalink
(maint) Log version and level at startup
Browse files Browse the repository at this point in the history
Logs pxp-agent version and configured log level as soon as logging is
configured. Clarifies when versions change in logging, which makes
debugging issues easier.
  • Loading branch information
MikaelSmith committed Jun 23, 2017
1 parent 5a10fea commit d8ed9a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion exe/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ int main(int argc, char *argv[]) {

try {
Configuration::Instance().setupLogging();
LOG_DEBUG("pxp-agent logging has been initialized");
} catch (const Configuration::Error& e) {
boost::nowide::cout << lth_loc::format("Failed to configure logging: {1}\n"
"Cannot start pxp-agent", e.what());
Expand Down
2 changes: 1 addition & 1 deletion lib/src/configuration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void Configuration::setupLogging()
loglevel,
pcp_access_fstream_ptr_);

LOG_DEBUG("Logging configured");
LOG_INFO("pxp-agent {1} started at {2} level", PXP_AGENT_VERSION, loglevel);

if (!log_on_stdout) {
// Configure platform-specific things for file logging
Expand Down
11 changes: 3 additions & 8 deletions locales/pxp-agent.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: pxp-agent 1.5.3\n"
"Project-Id-Version: pxp-agent 1.6.0\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down Expand Up @@ -69,11 +69,6 @@ msgid ""
"Cannot start pxp-agent"
msgstr ""

#. debug
#: exe/main.cc
msgid "pxp-agent logging has been initialized"
msgstr ""

#: exe/main.cc
msgid ""
"Failed to configure logging: {1}\n"
Expand Down Expand Up @@ -172,9 +167,9 @@ msgstr ""
msgid "invalid log level: '{1}'"
msgstr ""

#. debug
#. info
#: lib/src/configuration.cc
msgid "Logging configured"
msgid "pxp-agent {1} started at {2} level"
msgstr ""

#. info
Expand Down

0 comments on commit d8ed9a2

Please sign in to comment.