configuring logging is awkward and unreliable

Bug #1553219 reported by Alan Griffiths
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mir
Confirmed
Medium
Unassigned
mir (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

We have three(!) ways to configure logging:

1. (On startup configuring the server) server.override_the_logger([&]() ...
2. (On startup configuring the client by a debug API) Override ConnectionConfiguration::the_logger()
3. (At any time) mir::logging::set_logger(config->the_logger());

All of these are C++ APIs and none are part of the client "toolkit".

The first method is a public API and directs the output of the server reports and of calls to mir::log* (at least until the third method is used).

The second method is a private API and directs the output of client reports. (But not calls to mir::log*.)

The third method is a public C++ API and directs the output of calls to mir::log* and the client reports (unless the second method was used). (But not the server reports.)

It wasn't confusing before the third method was introduced (with the mir::log* functions). Maybe we should deprecate it?

Related branches

Revision history for this message
Chris Halse Rogers (raof) wrote :

Also, *none* of these ways are available to clients.

I think we should probably scrap (3), not use (2), and instead provide an actual client API for configuring the client logger.

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.21.0

Changed in mir:
status: New → Fix Committed
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

The branch that landed changed some behaviour without making the result any less confusing

Changed in mir:
status: Fix Committed → Confirmed
description: updated
Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
importance: Undecided → Medium
status: Confirmed → Fix Committed
milestone: none → 0.21.0
Changed in mir:
status: Fix Committed → Confirmed
assignee: Alan Griffiths (alan-griffiths) → nobody
milestone: 0.21.0 → none
Revision history for this message
Michał Sawicz (saviq) wrote :

Syncing task from Mir.

Changed in mir (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.