File: silence-logging-failure

package info (click to toggle)
plainbox 0.25-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,928 kB
  • ctags: 6,422
  • sloc: python: 38,849; xml: 16,029; sh: 33; makefile: 32
file content (34 lines) | stat: -rw-r--r-- 1,537 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From ce9cc78acb029cd556939b3a32fcbc6add9e01d6 Mon Sep 17 00:00:00 2001
From: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Date: Thu, 8 Oct 2015 10:13:54 -0700
Subject: Silence setup failure of the logging subsystem

 The logging subsystem has a feature that displays two lines of warnings
 if the per-user log file cannot be created. This leads to spurious
 errors when plainbox is invoked from a build environment. Before a
 better solution is found this warning is disabled as all of the
 subsequent, relevant, logging messages are display either way.
Bug-Ubuntu: https://bugs.launchpad.net/checkbox/+bug/1262898
Forwarded: yes
Last-Update: 2014-03-18

Patch-Name: silence-logging-failure
---
 plainbox/impl/logging.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/plainbox/impl/logging.py b/plainbox/impl/logging.py
index 85fe7dd..6e66da0 100644
--- a/plainbox/impl/logging.py
+++ b/plainbox/impl/logging.py
@@ -94,10 +94,6 @@ class LoggingHelper:
             try:
                 os.makedirs(self.log_dir, exist_ok=True)
             except OSError as error:
-                logger.warning(
-                    _("Unable to create log directory: %s"), self.log_dir)
-                logger.warning(_("Reason: %s. All logs will go to "
-                                 "console instead."), error)
                 config_dict = self.DEFAULT_CONSOLE_ONLY_CONFIG
         # Apply the selected configuration. This overrides anything currently
         # defined for all of the logging subsystem in this python runtime