Hello community,
here is the log from the commit of package python-oslo.log for openSUSE:Factory
checked in at 2020-08-10 15:05:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.log (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.log.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.log"
Mon Aug 10 15:05:40 2020 rev:19 rq:825320 version:4.1.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.log/python-oslo.log.changes
2020-06-05 20:16:26.279029819 +0200
+++
/work/SRC/openSUSE:Factory/.python-oslo.log.new.3399/python-oslo.log.changes
2020-08-10 15:06:08.640258530 +0200
@@ -1,0 +2,9 @@
+Mon Aug 10 10:19:13 UTC 2020 - [email protected]
+
+- update to version 4.1.3
+ - Update .gitreview for stable/ussuri
+ - Add missing SYSLOG_FACILITY to JournalHandler
+ - Default facility to None in OSJournalHandler class
+ - Update TOX/UPPER_CONSTRAINTS_FILE for stable/ussuri
+
+-------------------------------------------------------------------
Old:
----
oslo.log-4.1.1.tar.gz
New:
----
oslo.log-4.1.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.log.spec ++++++
--- /var/tmp/diff_new_pack.0pCgR1/_old 2020-08-10 15:06:09.332258895 +0200
+++ /var/tmp/diff_new_pack.0pCgR1/_new 2020-08-10 15:06:09.336258897 +0200
@@ -17,13 +17,13 @@
Name: python-oslo.log
-Version: 4.1.1
+Version: 4.1.3
Release: 0
Summary: OpenStack log library
License: Apache-2.0
Group: Development/Languages/Python
URL: https://launchpad.net/oslo.log
-Source0:
https://files.pythonhosted.org/packages/source/o/oslo.log/oslo.log-4.1.1.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/o/oslo.log/oslo.log-4.1.3.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-mock
BuildRequires: python3-monotonic >= 1.4
@@ -81,14 +81,14 @@
Documentation for the oslo.log library.
%prep
-%autosetup -p1 -n oslo.log-4.1.1
+%autosetup -p1 -n oslo.log-4.1.3
%py_req_cleanup
%build
%{py3_build}
# generate html docs
-PYTHONPATH=. PBR_VERSION=4.1.1 %sphinx_build -b html doc/source doc/build/html
+PYTHONPATH=. PBR_VERSION=4.1.3 %sphinx_build -b html doc/source doc/build/html
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
++++++ oslo.log-4.1.1.tar.gz -> oslo.log-4.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.log-4.1.1/AUTHORS new/oslo.log-4.1.3/AUTHORS
--- old/oslo.log-4.1.1/AUTHORS 2020-04-07 12:07:58.000000000 +0200
+++ new/oslo.log-4.1.3/AUTHORS 2020-06-04 13:13:13.000000000 +0200
@@ -17,10 +17,12 @@
Ann Kamyshnikova <[email protected]>
Atsushi SAKAI <[email protected]>
Ben Nemec <[email protected]>
+Benjamin Reichel <[email protected]>
Bogdan Dobrelya <[email protected]>
Bogdan Dobrelya <[email protected]>
Brad Pokorny <[email protected]>
Brant Knudson <[email protected]>
+Brian Haley <[email protected]>
Chang Bo Guo <[email protected]>
ChangBo Guo(gcb) <[email protected]>
Chris St. Pierre <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.log-4.1.1/ChangeLog new/oslo.log-4.1.3/ChangeLog
--- old/oslo.log-4.1.1/ChangeLog 2020-04-07 12:07:58.000000000 +0200
+++ new/oslo.log-4.1.3/ChangeLog 2020-06-04 13:13:13.000000000 +0200
@@ -1,6 +1,18 @@
CHANGES
=======
+4.1.3
+-----
+
+* Default facility to None in OSJournalHandler class
+
+4.1.2
+-----
+
+* Add missing SYSLOG\_FACILITY to JournalHandler
+* Update TOX/UPPER\_CONSTRAINTS\_FILE for stable/ussuri
+* Update .gitreview for stable/ussuri
+
4.1.1
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.log-4.1.1/PKG-INFO new/oslo.log-4.1.3/PKG-INFO
--- old/oslo.log-4.1.1/PKG-INFO 2020-04-07 12:07:58.000000000 +0200
+++ new/oslo.log-4.1.3/PKG-INFO 2020-06-04 13:13:14.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: oslo.log
-Version: 4.1.1
+Version: 4.1.3
Summary: oslo.log library
Home-page: https://docs.openstack.org/oslo.log/latest
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.log-4.1.1/oslo.log.egg-info/PKG-INFO
new/oslo.log-4.1.3/oslo.log.egg-info/PKG-INFO
--- old/oslo.log-4.1.1/oslo.log.egg-info/PKG-INFO 2020-04-07
12:07:58.000000000 +0200
+++ new/oslo.log-4.1.3/oslo.log.egg-info/PKG-INFO 2020-06-04
13:13:13.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: oslo.log
-Version: 4.1.1
+Version: 4.1.3
Summary: oslo.log library
Home-page: https://docs.openstack.org/oslo.log/latest
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.log-4.1.1/oslo.log.egg-info/SOURCES.txt
new/oslo.log-4.1.3/oslo.log.egg-info/SOURCES.txt
--- old/oslo.log-4.1.1/oslo.log.egg-info/SOURCES.txt 2020-04-07
12:07:58.000000000 +0200
+++ new/oslo.log-4.1.3/oslo.log.egg-info/SOURCES.txt 2020-06-04
13:13:13.000000000 +0200
@@ -90,6 +90,7 @@
playbooks/legacy/oslo.log-src-grenade-devstack/run.yaml
releasenotes/notes/.placeholder
releasenotes/notes/add-context-section-0b2f411ec64f42f6.yaml
+releasenotes/notes/add-facility-to-journal-e10bf7002cc19dd3.yaml
releasenotes/notes/add-reno-e4fedb11ece56f1e.yaml
releasenotes/notes/always-add-error-text-715022964364ffa0.yaml
releasenotes/notes/drop-python27-support-0fe4909a5468feb3.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.log-4.1.1/oslo.log.egg-info/pbr.json
new/oslo.log-4.1.3/oslo.log.egg-info/pbr.json
--- old/oslo.log-4.1.1/oslo.log.egg-info/pbr.json 2020-04-07
12:07:58.000000000 +0200
+++ new/oslo.log-4.1.3/oslo.log.egg-info/pbr.json 2020-06-04
13:13:13.000000000 +0200
@@ -1 +1 @@
-{"git_version": "2aaf7b0", "is_release": true}
\ No newline at end of file
+{"git_version": "c77f3c9", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.log-4.1.1/oslo_log/handlers.py
new/oslo.log-4.1.3/oslo_log/handlers.py
--- old/oslo.log-4.1.1/oslo_log/handlers.py 2020-04-07 12:06:45.000000000
+0200
+++ new/oslo.log-4.1.3/oslo_log/handlers.py 2020-06-04 13:12:36.000000000
+0200
@@ -82,13 +82,20 @@
'request_id',
)
- def __init__(self):
- # Do not use super() unless type(logging.Handler) is 'type'
- # (i.e. >= Python 2.7).
+ def __init__(self, facility=None):
if not journal:
raise RuntimeError("Systemd bindings do not exist")
+
+ if not facility:
+ if not syslog:
+ raise RuntimeError("syslog is not available on this platform")
+ facility = syslog.LOG_USER
+
+ # Do not use super() unless type(logging.Handler) is 'type'
+ # (i.e. >= Python 2.7).
logging.Handler.__init__(self)
self.binary_name = _get_binary_name()
+ self.facility = facility
def emit(self, record):
priority = SYSLOG_MAP.get(record.levelname, 7)
@@ -103,7 +110,8 @@
'LOGGER_NAME': record.name,
'LOGGER_LEVEL': record.levelname,
'SYSLOG_IDENTIFIER': self.binary_name,
- 'PRIORITY': priority
+ 'PRIORITY': priority,
+ 'SYSLOG_FACILITY': self.facility,
}
if record.exc_info:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.log-4.1.1/oslo_log/log.py
new/oslo.log-4.1.3/oslo_log/log.py
--- old/oslo.log-4.1.1/oslo_log/log.py 2020-04-07 12:06:45.000000000 +0200
+++ new/oslo.log-4.1.3/oslo_log/log.py 2020-06-04 13:12:36.000000000 +0200
@@ -387,7 +387,10 @@
log_root.addHandler(streamlog)
if conf.use_journal:
- journal = handlers.OSJournalHandler()
+ if syslog is None:
+ raise RuntimeError("syslog is not available on this platform")
+ facility = _find_facility(conf.syslog_log_facility)
+ journal = handlers.OSJournalHandler(facility=facility)
log_root.addHandler(journal)
if conf.use_eventlog:
@@ -412,7 +415,6 @@
log_root.addHandler(handler)
if conf.use_syslog:
- global syslog
if syslog is None:
raise RuntimeError("syslog is not available on this platform")
facility = _find_facility(conf.syslog_log_facility)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.log-4.1.1/oslo_log/tests/unit/test_log.py
new/oslo.log-4.1.3/oslo_log/tests/unit/test_log.py
--- old/oslo.log-4.1.1/oslo_log/tests/unit/test_log.py 2020-04-07
12:06:45.000000000 +0200
+++ new/oslo.log-4.1.3/oslo_log/tests/unit/test_log.py 2020-06-04
13:12:36.000000000 +0200
@@ -29,6 +29,10 @@
import syslog
except ImportError:
syslog = None
+try:
+ from systemd import journal
+except ImportError:
+ journal = None
import tempfile
import time
from unittest import mock
@@ -390,6 +394,15 @@
self.addCleanup(self.journal.stop)
log.setup(self.CONF, 'testing')
+ @testtools.skipUnless(journal, "systemd journal binding is not available")
+ def test_handler(self):
+ handler = handlers.OSJournalHandler()
+ handler.emit(
+ logging.LogRecord("foo", logging.INFO,
+ "path", 123, "hey!",
+ None, None))
+ self.assertTrue(self.journal.send.called)
+
def test_emit(self):
logger = log.getLogger('nova-test.foo')
local_context = _fake_new_context()
@@ -398,6 +411,7 @@
mock.call(mock.ANY, CODE_FILE=mock.ANY, CODE_FUNC='test_emit',
CODE_LINE=mock.ANY, LOGGER_LEVEL='INFO',
LOGGER_NAME='nova-test.foo', PRIORITY=6,
+ SYSLOG_FACILITY=syslog.LOG_USER,
SYSLOG_IDENTIFIER=mock.ANY,
REQUEST_ID=mock.ANY,
PROJECT_NAME='mytenant',
@@ -410,7 +424,8 @@
self.assertIsInstance(args[0], str)
self.assertIsInstance(kwargs['CODE_LINE'], int)
self.assertIsInstance(kwargs['PRIORITY'], int)
- del kwargs['CODE_LINE'], kwargs['PRIORITY']
+ self.assertIsInstance(kwargs['SYSLOG_FACILITY'], int)
+ del kwargs['CODE_LINE'], kwargs['PRIORITY'], kwargs['SYSLOG_FACILITY']
for key, arg in kwargs.items():
self.assertIsInstance(key, str)
self.assertIsInstance(arg, (bytes, str))
@@ -427,6 +442,7 @@
CODE_FUNC='test_emit_exception',
CODE_LINE=mock.ANY, LOGGER_LEVEL='ERROR',
LOGGER_NAME='nova-exception.foo', PRIORITY=3,
+ SYSLOG_FACILITY=syslog.LOG_USER,
SYSLOG_IDENTIFIER=mock.ANY,
REQUEST_ID=mock.ANY,
EXCEPTION_INFO=mock.ANY,
@@ -441,7 +457,8 @@
self.assertIsInstance(args[0], str)
self.assertIsInstance(kwargs['CODE_LINE'], int)
self.assertIsInstance(kwargs['PRIORITY'], int)
- del kwargs['CODE_LINE'], kwargs['PRIORITY']
+ self.assertIsInstance(kwargs['SYSLOG_FACILITY'], int)
+ del kwargs['CODE_LINE'], kwargs['PRIORITY'], kwargs['SYSLOG_FACILITY']
for key, arg in kwargs.items():
self.assertIsInstance(key, str)
self.assertIsInstance(arg, (bytes, str))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.log-4.1.1/releasenotes/notes/add-facility-to-journal-e10bf7002cc19dd3.yaml
new/oslo.log-4.1.3/releasenotes/notes/add-facility-to-journal-e10bf7002cc19dd3.yaml
---
old/oslo.log-4.1.1/releasenotes/notes/add-facility-to-journal-e10bf7002cc19dd3.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.log-4.1.3/releasenotes/notes/add-facility-to-journal-e10bf7002cc19dd3.yaml
2020-06-04 13:12:36.000000000 +0200
@@ -0,0 +1,7 @@
+---
+fixes:
+ - |
+ Using systemd journal handler, logs ending up in kern.log because
+ SYSLOG_FACILITY is missing. This fix uses the same facility configuration
+ option 'syslog-log-facility' as from syslog handler to provide the
+ missing value. (Bug #1871840)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.log-4.1.1/tox.ini new/oslo.log-4.1.3/tox.ini
--- old/oslo.log-4.1.1/tox.ini 2020-04-07 12:06:45.000000000 +0200
+++ new/oslo.log-4.1.3/tox.ini 2020-06-04 13:12:36.000000000 +0200
@@ -8,7 +8,7 @@
whitelist_externals =
find
deps =
-
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/ussuri}
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
@@ -27,7 +27,7 @@
[testenv:docs]
whitelist_externals = rm
deps =
-
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/ussuri}
-r{toxinidir}/doc/requirements.txt
commands =
rm -fr doc/build
@@ -36,7 +36,7 @@
[testenv:releasenotes]
whitelist_externals = rm
deps =
-
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/ussuri}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build