[Commits] [wesnoth/wesnoth] 8f5dc7: campaignd: Log messages to a new log domain of our...

GitHub noreply at github.com
Mon Jun 30 00:50:46 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 8f5dc70de16348e7ad45211320bff702b91ddf38
      https://github.com/wesnoth/wesnoth/commit/8f5dc70de16348e7ad45211320bff702b91ddf38
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-29 (Sun, 29 Jun 2014)

  Changed paths:
    M src/campaign_server/campaign_server.cpp

  Log Message:
  -----------
  campaignd: Log messages to a new log domain of our own

Until now, campaignd logged its diagnostics to the network log domain
with the show_names parameter (of logger::operator()()) set to false so
as to avoid showing the log level or domain names in stderr. There are
two issues with this approach:

 * In order to tell the difference between informational and error
   messages, the messages themselves need to include a severity label in
   some form, which defeats half the point of using our standard logging
   facilities (though not the other half, which is having timestamps).
 * In the event that messages from other domains appear in stderr (which
   can only happen if their severity is 'warning' or more at this time,
   since campaignd doesn't change the default severity configuration),
   the log could become a jumbled mess.

Note that wesnothd (which produces a larger volume of diagnostics all
the time) does already use a log domain of its own with no overidden
show_names option.

Giving campaignd its own log domain should allow us to add more optional
diagnostics later if needed, and right now it allows us to do away with
the unwieldy severity labels in the log messages themselves in favor of
choosing the right logger in the invocation -- although this last point
is beyond the scope of this introductory commit.

This commit keeps our previous logging macro, LOG_CS, just replacing the
log domain and severity (info instead of err) and dropping the
overridden show_names value. Later I'll take care of choosing more
relevant severities for different messages. For now, we do like wesnothd
and select the info severity as the default during initialization so the
messages can still display.


  Commit: d1dd66dcbeef346128e108b9743b5f29ff30bb82
      https://github.com/wesnoth/wesnoth/commit/d1dd66dcbeef346128e108b9743b5f29ff30bb82
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-29 (Sun, 29 Jun 2014)

  Changed paths:
    M src/campaign_server/campaign_server.cpp

  Log Message:
  -----------
  campaignd: Move error messages to the error logger, drop inline "ERROR" label

This includes messages emitted by the send_error() method, which is used
all over the place.


  Commit: cc1049bc512fb1ea6f4df510e90809bd1bcdcb17
      https://github.com/wesnoth/wesnoth/commit/cc1049bc512fb1ea6f4df510e90809bd1bcdcb17
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-29 (Sun, 29 Jun 2014)

  Changed paths:
    M src/campaign_server/campaign_server.cpp

  Log Message:
  -----------
  Merge branch 'feature/campaignd-log-rework'


  Commit: ab8081041d11261926e32b624832e3a597fe3976
      https://github.com/wesnoth/wesnoth/commit/ab8081041d11261926e32b624832e3a597fe3976
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-29 (Sun, 29 Jun 2014)

  Changed paths:
    M .travis.yml

  Log Message:
  -----------
  Merge branch 'master' of github.com:wesnoth/wesnoth


Compare: https://github.com/wesnoth/wesnoth/compare/8c1656d56f0a...ab8081041d11


More information about the Commits mailing list