App logging should be off by default

Bug #1414039 reported by Pat McGowan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Thomas Strehl
ubuntu-app-launch (Ubuntu)
Fix Released
High
Ted Gould
ubuntu-system-settings (Ubuntu)
Invalid
High
Unassigned

Bug Description

We are creating 100s of MBs in log files which are generally unused on production systems

Propose to turn app logging off by default and add an option under developer mode to enable it along with additional logging levels like debug.
Also, apps and shell should examine their logging to become far less verbose

Related branches

Revision history for this message
Gerry Boland (gerboland) wrote :

unity8 has a big log file, because qtmir has all debug logging info turned on by default.
This can be changed just for unity8 by setting adding this env var to its upstart job:
   QT_LOGGING_RULES="*.debug=false"

Alternatively can apply this policy for all Qt apps in the system by creating ~/.config/QtProject/qtlogging.ini with these contents:

[Rules]
*.debug=false

Could use "*=false" to hide nearly all app output. For more info, see http://doc.qt.io/qt-5/qloggingcategory.html

I think the latter suggestion is easiest to implement should we want to turn the warnings back on for developer mode.

Revision history for this message
Ted Gould (ted) wrote :

I think that the log files provide important information about context for crash reports. While users aren't using the log files, the fact that they can be attached is an important support feature for applications (and services) deployed in production.

I think that we can shorten the amount of time we keep them. For instance, we could delete the log file for an application when the application exits. It should have either been grabbed by apport and handle by that time regardless.

Revision history for this message
Ted Gould (ted) wrote :

WRT @gerry I think that it would be nice if the same option also turned on/off G_DEBUG=all. Which unfortunately is only an environmental setting. So perhaps we could set Qt with the environment setting as well. I've done that in my own setup with an Upstart job that is "start on starting dbus" that then injects the environment variables into the Upstart session. We could have that check a setting before running.

Revision history for this message
Ted Gould (ted) wrote :

Not clear where this bug is? People happy with the solutions proposed? Is it targetted for ww05?

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

lets decide on the fix for first update

Changed in canonical-devices-system-image:
importance: Undecided → High
milestone: none → ww07-2015
status: New → In Progress
Revision history for this message
Sebastien Bacher (seb128) wrote :

Not sure that's a setting issue, looks like rather it's a configuration from the base image

Changed in ubuntu-system-settings (Ubuntu):
importance: Undecided → High
Revision history for this message
Michi Henning (michihenning) wrote :

> Propose to turn app logging off by default and add an option under developer mode to enable it along with additional logging levels like debug.

I'm happy to look up developer mode and, if developer mode isn't enabled, turn logging off (or restrict it to high severity message).

Is there an API I can use to figure out whether developer mode is on or off? Also, when *not* running on the phone, I want those logs for testing and the like. So, is there a way to make sure that, if I call whatever API reports this on the desktop, that it returns "developer mode on" or alternatively, a way to find out whether I'm *not* running on a phone, so I can ignore the developer mode setting and log regardless?

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Need to just decide an approach

Changed in canonical-devices-system-image:
assignee: nobody → Thomas Strehl (strehl-t)
milestone: ww07-2015 → ww09-2015
Ted Gould (ted)
affects: upstart-app-launch (Ubuntu) → ubuntu-app-launch (Ubuntu)
Changed in ubuntu-app-launch (Ubuntu):
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Ted Gould (ted)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-app-launch - 0.4+15.04.20150305.1-0ubuntu1

---------------
ubuntu-app-launch (0.4+15.04.20150305.1-0ubuntu1) vivid; urgency=medium

  [ CI Train Bot ]
  * debian/libubuntu-app-launch2.symbols: auto-update to released
    version

  [ Ted Gould ]
  * Add a test tool to run an application from the command line (LP:
    #1425286)
  * Emit a signal when applications are paused or resumed (LP: #1425285)
  * Remove application log on exit if not in developer mode (LP:
    #1414039)
 -- CI Train Bot <email address hidden> Thu, 05 Mar 2015 14:36:35 +0000

Changed in ubuntu-app-launch (Ubuntu):
status: Confirmed → Fix Released
Changed in canonical-devices-system-image:
milestone: ww09-2015 → ww11-2015
status: In Progress → Fix Released
status: Fix Released → In Progress
Changed in canonical-devices-system-image:
status: In Progress → Fix Released
Changed in ubuntu-system-settings (Ubuntu):
status: New → Invalid
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.