Hello community, here is the log from the commit of package python-oslo.log for openSUSE:Factory checked in at 2015-12-21 12:03:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-oslo.log (Old) and /work/SRC/openSUSE:Factory/.python-oslo.log.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.log" Changes: -------- --- /work/SRC/openSUSE:Factory/python-oslo.log/python-oslo.log.changes 2015-10-30 13:42:26.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-oslo.log.new/python-oslo.log.changes 2015-12-21 12:03:59.000000000 +0100 @@ -1,0 +2,18 @@ +Mon Nov 16 10:10:43 UTC 2015 - [email protected] + +- update to 1.12.0: + * Fix coverage configuration and execution + * No need for Oslo Incubator Sync + * Imported Translations from Zanata + * Fix unintended assignment of "syslog" + * Make doc title consistent with readme + * add documentation with example of an external configuration file + * add auto-generated docs for config options + * Update option docs for when log config is used + * Updated from global requirements + * Add optional 'fixture' dependencies + * Change ignore-errors to ignore_errors + * Fix the home-page value in setup.cfg with openstack.org + * FastWatchedFileHandler class was added + +------------------------------------------------------------------- Old: ---- oslo.log-1.11.0.tar.gz New: ---- oslo.log-1.12.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-oslo.log.spec ++++++ --- /var/tmp/diff_new_pack.HuHcU7/_old 2015-12-21 12:04:00.000000000 +0100 +++ /var/tmp/diff_new_pack.HuHcU7/_new 2015-12-21 12:04:00.000000000 +0100 @@ -17,7 +17,7 @@ Name: python-oslo.log -Version: 1.11.0 +Version: 1.12.0 Release: 0 Summary: OpenStack logging API License: Apache-2.0 @@ -39,6 +39,7 @@ BuildRequires: python-oslo.utils BuildRequires: python-oslosphinx BuildRequires: python-oslotest +BuildRequires: python-pyinotify BuildRequires: python-python-subunit BuildRequires: python-sphinx BuildRequires: python-testrepository @@ -53,6 +54,7 @@ Requires: python-oslo.i18n >= 1.5.0 Requires: python-oslo.serialization >= 1.4.0 Requires: python-oslo.utils >= 2.0.0 +Requires: python-pyinotify Requires: python-six >= 1.9.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 ++++++ oslo.log-1.11.0.tar.gz -> oslo.log-1.12.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/.coveragerc new/oslo.log-1.12.0/.coveragerc --- old/oslo.log-1.11.0/.coveragerc 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/.coveragerc 2015-10-12 17:36:35.000000000 +0200 @@ -1,7 +1,7 @@ [run] branch = True -source = log -omit = log/tests/*,log/openstack/* +source = oslo_log +omit = oslo_log/tests/* [report] -ignore-errors = True \ No newline at end of file +ignore_errors = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/AUTHORS new/oslo.log-1.12.0/AUTHORS --- old/oslo.log-1.11.0/AUTHORS 2015-09-08 17:43:24.000000000 +0200 +++ new/oslo.log-1.12.0/AUTHORS 2015-10-12 17:37:16.000000000 +0200 @@ -51,7 +51,10 @@ Lance Bragstad <[email protected]> Lianhao Lu <[email protected]> Luis A. Garcia <[email protected]> +Marian Horban <[email protected]> +Mark Doffman <[email protected]> Mark McLoughlin <[email protected]> +Masaki Matsushita <[email protected]> Mate Lakat <[email protected]> Matt Odden <[email protected]> Michael Basnight <[email protected]> @@ -66,6 +69,7 @@ Rajesh Tailor <[email protected]> Rick Harris <[email protected]> Roman Podoliaka <[email protected]> +Ronald Bradford <[email protected]> Russell Bryant <[email protected]> Sean Dague <[email protected]> Sean Dague <[email protected]> @@ -89,4 +93,5 @@ abhishekkekane <[email protected]> gtt116 <[email protected]> tanlin <[email protected]> +venkatamahesh <[email protected]> zhang-jinnan <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/ChangeLog new/oslo.log-1.12.0/ChangeLog --- old/oslo.log-1.11.0/ChangeLog 2015-09-08 17:43:24.000000000 +0200 +++ new/oslo.log-1.12.0/ChangeLog 2015-10-12 17:37:16.000000000 +0200 @@ -1,6 +1,23 @@ CHANGES ======= +1.12.0 +------ + +* Fix coverage configuration and execution +* No need for Oslo Incubator Sync +* Imported Translations from Zanata +* Fix unintended assignment of "syslog" +* Make doc title consistent with readme +* add documentation with example of an external configuration file +* add auto-generated docs for config options +* Update option docs for when log config is used +* Updated from global requirements +* Add optional 'fixture' dependencies +* Change ignore-errors to ignore_errors +* Fix the home-page value in setup.cfg with openstack.org +* FastWatchedFileHandler class was added + 1.11.0 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/PKG-INFO new/oslo.log-1.12.0/PKG-INFO --- old/oslo.log-1.11.0/PKG-INFO 2015-09-08 17:43:24.000000000 +0200 +++ new/oslo.log-1.12.0/PKG-INFO 2015-10-12 17:37:17.000000000 +0200 @@ -1,8 +1,8 @@ Metadata-Version: 1.1 Name: oslo.log -Version: 1.11.0 +Version: 1.12.0 Summary: oslo.log library -Home-page: http://launchpad.net/oslo +Home-page: http://www.openstack.org Author: OpenStack Author-email: [email protected] License: UNKNOWN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/doc/source/conf.py new/oslo.log-1.12.0/doc/source/conf.py --- old/oslo.log-1.11.0/doc/source/conf.py 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/doc/source/conf.py 2015-10-12 17:36:35.000000000 +0200 @@ -23,7 +23,8 @@ extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'oslosphinx' + 'oslosphinx', + 'oslo_config.sphinxext', ] # autodoc generation is a bit aggressive and a nuisance when doing heavy @@ -72,4 +73,4 @@ ] # Example configuration for intersphinx: refer to the Python standard library. -#intersphinx_mapping = {'http://docs.python.org/': None} \ No newline at end of file +#intersphinx_mapping = {'http://docs.python.org/': None} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/doc/source/configfiles/example_nova.rst new/oslo.log-1.12.0/doc/source/configfiles/example_nova.rst --- old/oslo.log-1.11.0/doc/source/configfiles/example_nova.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.log-1.12.0/doc/source/configfiles/example_nova.rst 2015-10-12 17:36:35.000000000 +0200 @@ -0,0 +1,84 @@ +========================================= + Example Configuration File for ``nova`` +========================================= + +This sample configuration file demonstrates how the OpenStack compute +service (nova) might be configured. + +.. literalinclude:: nova_sample.conf + :language: ini + :prepend: # nova_sample.conf + +Two logger nodes are set up, ``root`` and ``nova``. + +.. literalinclude:: nova_sample.conf + :language: ini + :lines: 1-2 + +Several handlers are created, to send messages to different outputs. + +.. literalinclude:: nova_sample.conf + :language: ini + :lines: 4-5 + +And two formatters are created to be used based on whether the logging +location will have OpenStack request context information available or +not. + +.. literalinclude:: nova_sample.conf + :language: ini + :lines: 7-8 + +The ``root`` logger is configured to send messages to the ``null`` +handler, silencing most messages that are not part of the nova +application code namespace. + +.. literalinclude:: nova_sample.conf + :language: ini + :lines: 10-12 + +The ``nova`` logger is configured to send messages marked as ``INFO`` +and higher level to the standard error stream. + +.. literalinclude:: nova_sample.conf + :language: ini + :lines: 14-17 + +The ``amqp`` and ``amqplib`` loggers, used by the module that connects +the application to the message bus, are configured to emit warning +messages to the standard error stream. + +.. literalinclude:: nova_sample.conf + :language: ini + :lines: 19-27 + +The ``sqlalchemy`` logger, used by the module that connects the +application to the database, is configured to emit warning messages to +the standard error stream. + +.. literalinclude:: nova_sample.conf + :language: ini + :lines: 29-35 + +Similarly, ``boto``, ``suds``, and ``eventlet.wsgi.server`` are +configured to send warnings to the standard error stream. + +.. literalinclude:: nova_sample.conf + :language: ini + :lines: 37-53 + +The ``stderr`` handler, being used by most of the loggers above, is +configured to write to the standard error stream on the console. + +.. literalinclude:: nova_sample.conf + :language: ini + :lines: 55-58 + +The ``stderr`` handler uses the ``context`` formatter, which takes its +configuration settings from ``oslo.config``. + +.. literalinclude:: nova_sample.conf + :language: ini + :lines: 80-81 + +The ``stdout`` and ``syslog`` handlers are defined, but not used. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/doc/source/configfiles/index.rst new/oslo.log-1.12.0/doc/source/configfiles/index.rst --- old/oslo.log-1.11.0/doc/source/configfiles/index.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.log-1.12.0/doc/source/configfiles/index.rst 2015-10-12 17:36:35.000000000 +0200 @@ -0,0 +1,47 @@ +============================== + Advanced Configuration Files +============================== + +The oslo.config options described in :doc:`/opts` make it easy to +enable some default logging configuration behavior such as setting the +default log level and output file. For more advanced configurations +using translations or multiple output destinations oslo.log relies on +the Python standard library logging module configuration file +features. + +The configuration file can be used to tie together the loggers, +handlers, and formatters and provide all of the necessary +configuration values to enable any desired behavior. Refer to the +`Python logging Module Tutorial`_ for descriptions of these concepts. + +Logger Names +============ + +Loggers are configured by name. Most OpenStack applications use logger +names based on the source file where the message is coming from. A +file named ``myapp/package/module.py`` corresponds to a logger named +``myapp.package.module``. + +Loggers are configured in a tree structure, and the names reflect +their location in this hierarchy. It is not necessary to configure +every logger, since messages are passed up the tree during +processing. To control the logging for ``myapp``, for example, it is +only necessary to set up a logger for ``myapp`` and not +``myapp.package.module``. + +The base of the tree, through which all log message may pass unless +otherwise discarded, is called the ``root`` logger. + +Example Files +============= + +.. toctree:: + :glob: + + example* + +.. seealso:: + + * `Python logging Module Tutorial`_ + +.. _Python logging Module Tutorial: https://docs.python.org/2.7/howto/logging.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/doc/source/configfiles/nova_sample.conf new/oslo.log-1.12.0/doc/source/configfiles/nova_sample.conf --- old/oslo.log-1.11.0/doc/source/configfiles/nova_sample.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.log-1.12.0/doc/source/configfiles/nova_sample.conf 2015-10-12 17:36:35.000000000 +0200 @@ -0,0 +1,84 @@ +[loggers] +keys = root, nova + +[handlers] +keys = stderr, stdout, watchedfile, syslog, null + +[formatters] +keys = context, default + +[logger_root] +level = WARNING +handlers = null + +[logger_nova] +level = INFO +handlers = stderr +qualname = nova + +[logger_amqp] +level = WARNING +handlers = stderr +qualname = amqp + +[logger_amqplib] +level = WARNING +handlers = stderr +qualname = amqplib + +[logger_sqlalchemy] +level = WARNING +handlers = stderr +qualname = sqlalchemy +# "level = INFO" logs SQL queries. +# "level = DEBUG" logs SQL queries and results. +# "level = WARNING" logs neither. (Recommended for production systems.) + +[logger_boto] +level = WARNING +handlers = stderr +qualname = boto + +# NOTE(mikal): suds is used by the vmware driver, removing this will +# cause many extraneous log lines for their tempest runs. Refer to +# https://review.openstack.org/#/c/219225/ for details. +[logger_suds] +level = INFO +handlers = stderr +qualname = suds + +[logger_eventletwsgi] +level = WARNING +handlers = stderr +qualname = eventlet.wsgi.server + +[handler_stderr] +class = StreamHandler +args = (sys.stderr,) +formatter = context + +[handler_stdout] +class = StreamHandler +args = (sys.stdout,) +formatter = context + +[handler_watchedfile] +class = handlers.WatchedFileHandler +args = ('nova.log',) +formatter = context + +[handler_syslog] +class = handlers.SysLogHandler +args = ('/dev/log', handlers.SysLogHandler.LOG_USER) +formatter = context + +[handler_null] +class = logging.NullHandler +formatter = default +args = () + +[formatter_context] +class = oslo_log.formatters.ContextFormatter + +[formatter_default] +format = %(message)s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/doc/source/index.rst new/oslo.log-1.12.0/doc/source/index.rst --- old/oslo.log-1.11.0/doc/source/index.rst 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/doc/source/index.rst 2015-10-12 17:36:35.000000000 +0200 @@ -1,8 +1,8 @@ -==================================== -Welcome to oslo.log's documentation! -==================================== +================================ +oslo.log -- Oslo Logging Library +================================ -The `oslo`_ log (logging) configuration library provides standardized +The oslo.log (logging) configuration library provides standardized configuration for all openstack projects. It also provides custom formatters, handlers and support for context specific logging (like resource id's etc). @@ -12,6 +12,8 @@ installation usage + opts + configfiles/index contributing history @@ -30,5 +32,3 @@ * :ref:`genindex` * :ref:`modindex` * :ref:`search` - -.. _oslo: https://wiki.openstack.org/wiki/Oslo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/doc/source/installation.rst new/oslo.log-1.12.0/doc/source/installation.rst --- old/oslo.log-1.11.0/doc/source/installation.rst 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/doc/source/installation.rst 2015-10-12 17:36:35.000000000 +0200 @@ -5,3 +5,8 @@ At the command line:: $ pip install oslo.log + +To use ``oslo_log.fixture``, some additional dependencies +are needed. They can be installed using the ``fixtures`` extra:: + + $ pip install 'oslo.log[fixtures]' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/doc/source/opts.rst new/oslo.log-1.12.0/doc/source/opts.rst --- old/oslo.log-1.11.0/doc/source/opts.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.log-1.12.0/doc/source/opts.rst 2015-10-12 17:36:35.000000000 +0200 @@ -0,0 +1,9 @@ +======================= + Configuration Options +======================= + +oslo.log uses oslo.config to define and manage configuration options +to allow the deployer to control how an application's logs are +handled. + +.. show-options:: oslo.log diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/openstack-common.conf new/oslo.log-1.12.0/openstack-common.conf --- old/oslo.log-1.11.0/openstack-common.conf 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/openstack-common.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -[DEFAULT] - -modules= - -# The base module to hold the copy of openstack.common -base=oslo_log diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo.log/locale/es/LC_MESSAGES/oslo.log.po new/oslo.log-1.12.0/oslo.log/locale/es/LC_MESSAGES/oslo.log.po --- old/oslo.log-1.11.0/oslo.log/locale/es/LC_MESSAGES/oslo.log.po 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/oslo.log/locale/es/LC_MESSAGES/oslo.log.po 2015-10-12 17:36:35.000000000 +0200 @@ -4,20 +4,22 @@ # # Translators: # Adriana Chisco Landazábal <[email protected]>, 2015 +# OpenStack Infra <[email protected]>, 2015. #zanata msgid "" msgstr "" -"Project-Id-Version: oslo.log\n" +"Project-Id-Version: oslo.log 1.11.1.dev17\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-08-04 06:24+0000\n" -"PO-Revision-Date: 2015-06-22 20:59+0000\n" +"POT-Creation-Date: 2015-09-26 06:06+0000\n" +"PO-Revision-Date: 2015-06-22 08:59+0000\n" "Last-Translator: Adriana Chisco Landazábal <[email protected]>\n" +"Language: es\n" "Language-Team: Spanish (http://www.transifex.com/openstack/oslolog/language/" "es/)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.0\n" +"Generated-By: Babel 2.1.1\n" #, python-format msgid "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo.log/locale/oslo.log-log-critical.pot new/oslo.log-1.12.0/oslo.log/locale/oslo.log-log-critical.pot --- old/oslo.log-1.11.0/oslo.log/locale/oslo.log-log-critical.pot 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/oslo.log/locale/oslo.log-log-critical.pot 2015-10-12 17:36:35.000000000 +0200 @@ -6,14 +6,14 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: oslo.log 1.7.1.dev1\n" +"Project-Id-Version: oslo.log 1.11.1.dev17\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-29 06:31+0000\n" +"POT-Creation-Date: 2015-09-26 06:06+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.0\n" +"Generated-By: Babel 2.1.1\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo.log/locale/oslo.log-log-error.pot new/oslo.log-1.12.0/oslo.log/locale/oslo.log-log-error.pot --- old/oslo.log-1.11.0/oslo.log/locale/oslo.log-log-error.pot 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/oslo.log/locale/oslo.log-log-error.pot 2015-10-12 17:36:35.000000000 +0200 @@ -6,14 +6,14 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: oslo.log 1.7.1.dev1\n" +"Project-Id-Version: oslo.log 1.11.1.dev17\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-29 06:31+0000\n" +"POT-Creation-Date: 2015-09-26 06:06+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.0\n" +"Generated-By: Babel 2.1.1\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo.log/locale/oslo.log-log-info.pot new/oslo.log-1.12.0/oslo.log/locale/oslo.log-log-info.pot --- old/oslo.log-1.11.0/oslo.log/locale/oslo.log-log-info.pot 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/oslo.log/locale/oslo.log-log-info.pot 2015-10-12 17:36:35.000000000 +0200 @@ -6,14 +6,14 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: oslo.log 1.7.1.dev1\n" +"Project-Id-Version: oslo.log 1.11.1.dev17\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-29 06:31+0000\n" +"POT-Creation-Date: 2015-09-26 06:06+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.0\n" +"Generated-By: Babel 2.1.1\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo.log/locale/oslo.log-log-warning.pot new/oslo.log-1.12.0/oslo.log/locale/oslo.log-log-warning.pot --- old/oslo.log-1.11.0/oslo.log/locale/oslo.log-log-warning.pot 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/oslo.log/locale/oslo.log-log-warning.pot 2015-10-12 17:36:35.000000000 +0200 @@ -6,14 +6,14 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: oslo.log 1.7.1.dev1\n" +"Project-Id-Version: oslo.log 1.11.1.dev17\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-29 06:31+0000\n" +"POT-Creation-Date: 2015-09-26 06:06+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.0\n" +"Generated-By: Babel 2.1.1\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo.log/locale/oslo.log.pot new/oslo.log-1.12.0/oslo.log/locale/oslo.log.pot --- old/oslo.log-1.11.0/oslo.log/locale/oslo.log.pot 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/oslo.log/locale/oslo.log.pot 2015-10-12 17:36:35.000000000 +0200 @@ -6,57 +6,57 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: oslo.log 1.7.1.dev1\n" +"Project-Id-Version: oslo.log 1.11.1.dev17\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-29 06:31+0000\n" +"POT-Creation-Date: 2015-09-26 06:06+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.0\n" +"Generated-By: Babel 2.1.1\n" -#: oslo_log/log.py:198 +#: oslo_log/log.py:214 #, python-format msgid "Error loading logging config %(log_config)s: %(err_msg)s" msgstr "" -#: oslo_log/log.py:285 +#: oslo_log/log.py:301 #, python-format msgid "syslog facility must be one of: %s" msgstr "" -#: oslo_log/versionutils.py:112 +#: oslo_log/versionutils.py:124 #, python-format msgid "" "%(what)s is deprecated as of %(as_of)s in favor of %(in_favor_of)s and " "may be removed in %(remove_in)s." msgstr "" -#: oslo_log/versionutils.py:116 +#: oslo_log/versionutils.py:128 #, python-format msgid "" "%(what)s is deprecated as of %(as_of)s and may be removed in " "%(remove_in)s. It will not be superseded." msgstr "" -#: oslo_log/versionutils.py:120 +#: oslo_log/versionutils.py:132 #, python-format msgid "%(what)s is deprecated as of %(as_of)s in favor of %(in_favor_of)s." msgstr "" -#: oslo_log/versionutils.py:123 +#: oslo_log/versionutils.py:135 #, python-format msgid "%(what)s is deprecated as of %(as_of)s. It will not be superseded." msgstr "" -#: oslo_log/versionutils.py:248 +#: oslo_log/versionutils.py:260 #, python-format msgid "Deprecated: %s" msgstr "" -#: oslo_log/versionutils.py:266 +#: oslo_log/versionutils.py:278 #, python-format msgid "Fatal call to deprecated config: %(msg)s" msgstr "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo.log.egg-info/PKG-INFO new/oslo.log-1.12.0/oslo.log.egg-info/PKG-INFO --- old/oslo.log-1.11.0/oslo.log.egg-info/PKG-INFO 2015-09-08 17:43:24.000000000 +0200 +++ new/oslo.log-1.12.0/oslo.log.egg-info/PKG-INFO 2015-10-12 17:37:16.000000000 +0200 @@ -1,8 +1,8 @@ Metadata-Version: 1.1 Name: oslo.log -Version: 1.11.0 +Version: 1.12.0 Summary: oslo.log library -Home-page: http://launchpad.net/oslo +Home-page: http://www.openstack.org Author: OpenStack Author-email: [email protected] License: UNKNOWN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo.log.egg-info/SOURCES.txt new/oslo.log-1.12.0/oslo.log.egg-info/SOURCES.txt --- old/oslo.log-1.11.0/oslo.log.egg-info/SOURCES.txt 2015-09-08 17:43:24.000000000 +0200 +++ new/oslo.log-1.12.0/oslo.log.egg-info/SOURCES.txt 2015-10-12 17:37:17.000000000 +0200 @@ -9,7 +9,6 @@ MANIFEST.in README.rst babel.cfg -openstack-common.conf requirements.txt setup.cfg setup.py @@ -20,6 +19,7 @@ doc/source/history.rst doc/source/index.rst doc/source/installation.rst +doc/source/opts.rst doc/source/usage.rst doc/source/api/fixtures.rst doc/source/api/formatters.rst @@ -27,6 +27,9 @@ doc/source/api/helpers.rst doc/source/api/log.rst doc/source/api/versionutils.rst +doc/source/configfiles/example_nova.rst +doc/source/configfiles/index.rst +doc/source/configfiles/nova_sample.conf oslo.log.egg-info/PKG-INFO oslo.log.egg-info/SOURCES.txt oslo.log.egg-info/dependency_links.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo.log.egg-info/pbr.json new/oslo.log-1.12.0/oslo.log.egg-info/pbr.json --- old/oslo.log-1.11.0/oslo.log.egg-info/pbr.json 2015-09-08 17:43:24.000000000 +0200 +++ new/oslo.log-1.12.0/oslo.log.egg-info/pbr.json 2015-10-12 17:37:16.000000000 +0200 @@ -1 +1 @@ -{"is_release": true, "git_version": "f718919"} \ No newline at end of file +{"git_version": "9761413", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo.log.egg-info/requires.txt new/oslo.log-1.12.0/oslo.log.egg-info/requires.txt --- old/oslo.log-1.11.0/oslo.log.egg-info/requires.txt 2015-09-08 17:43:24.000000000 +0200 +++ new/oslo.log-1.12.0/oslo.log.egg-info/requires.txt 2015-10-12 17:37:16.000000000 +0200 @@ -1,4 +1,4 @@ -pbr<2.0,>=1.6 +pbr>=1.6 Babel>=1.3 six>=1.9.0 iso8601>=0.1.9 @@ -8,3 +8,7 @@ oslo.utils>=2.0.0 oslo.serialization>=1.4.0 debtcollector>=0.3.0 +pyinotify>=0.9.6 + +[fixtures] +fixtures>=1.3.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo_log/_options.py new/oslo.log-1.12.0/oslo_log/_options.py --- old/oslo.log-1.11.0/oslo_log/_options.py 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/oslo_log/_options.py 2015-10-12 17:36:35.000000000 +0200 @@ -40,7 +40,11 @@ help='The name of a logging configuration file. This file ' 'is appended to any existing logging configuration ' 'files. For details about logging configuration files, ' - 'see the Python logging module documentation.'), + 'see the Python logging module documentation. Note that ' + 'when logging configuration files are used then all ' + 'logging configuration is set in the configuration file ' + 'and other logging configuration options are ignored ' + '(for example, log_format).'), cfg.StrOpt('log-format', metavar='FORMAT', help='DEPRECATED. ' @@ -48,26 +52,39 @@ 'use any of the available logging.LogRecord attributes. ' 'This option is deprecated. Please use ' 'logging_context_format_string and ' - 'logging_default_format_string instead.'), + 'logging_default_format_string instead. This option is ' + 'ignored if log_config_append is set.'), cfg.StrOpt('log-date-format', default=_DEFAULT_LOG_DATE_FORMAT, metavar='DATE_FORMAT', help='Format string for %%(asctime)s in log records. ' - 'Default: %(default)s .'), + 'Default: %(default)s . This option is ignored if ' + 'log_config_append is set.'), cfg.StrOpt('log-file', metavar='PATH', deprecated_name='logfile', help='(Optional) Name of log file to output to. ' - 'If no default is set, logging will go to stdout.'), + 'If no default is set, logging will go to stdout. This ' + 'option is ignored if log_config_append is set.'), cfg.StrOpt('log-dir', deprecated_name='logdir', help='(Optional) The base directory used for relative ' - '--log-file paths.'), + '--log-file paths. This option is ignored if ' + 'log_config_append is set.'), + cfg.BoolOpt('watch-log-file', + default=False, + help='(Optional) Uses logging handler designed to watch file ' + 'system. When log file is moved or removed this handler ' + 'will open a new log file with specified path ' + 'instantaneously. It makes sense only if log-file option ' + 'is specified and Linux platform is used. This option is ' + 'ignored if log_config_append is set.'), cfg.BoolOpt('use-syslog', default=False, help='Use syslog for logging. ' 'Existing syslog format is DEPRECATED ' - 'and will be changed later to honor RFC5424.'), + 'and will be changed later to honor RFC5424. This option ' + 'is ignored if log_config_append is set.'), cfg.BoolOpt('use-syslog-rfc-format', default=True, deprecated_for_removal=True, @@ -75,16 +92,19 @@ 'for logging. If enabled, prefixes the MSG part of the ' 'syslog message with APP-NAME (RFC5424). The ' 'format without the APP-NAME is deprecated in Kilo, ' - 'and will be removed in Mitaka, along with this option.'), + 'and will be removed in Mitaka, along with this option. ' + 'This option is ignored if log_config_append is set.'), cfg.StrOpt('syslog-log-facility', default='LOG_USER', - help='Syslog facility to receive log lines.') + help='Syslog facility to receive log lines. This option is ' + 'ignored if log_config_append is set.') ] generic_log_opts = [ cfg.BoolOpt('use_stderr', default=True, - help='Log output to standard error.') + help='Log output to standard error. This option is ignored if ' + 'log_config_append is set.') ] DEFAULT_LOG_LEVELS = ['amqp=WARN', 'amqplib=WARN', 'boto=WARN', @@ -116,7 +136,8 @@ help='Prefix each line of exception output with this format.'), cfg.ListOpt('default_log_levels', default=DEFAULT_LOG_LEVELS, - help='List of logger=LEVEL pairs.'), + help='List of logger=LEVEL pairs. This option is ignored if ' + 'log_config_append is set.'), cfg.BoolOpt('publish_errors', default=False, help='Enables or disables publication of error events.'), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo_log/handlers.py new/oslo.log-1.12.0/oslo_log/handlers.py --- old/oslo.log-1.11.0/oslo_log/handlers.py 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/oslo_log/handlers.py 2015-10-12 17:36:35.000000000 +0200 @@ -10,11 +10,15 @@ # License for the specific language governing permissions and limitations # under the License. +import errno import inspect import logging import logging.config import logging.handlers import os +import pyinotify +import stat +import time try: import syslog except ImportError: @@ -115,3 +119,88 @@ def format(self, record): record.color = self.LEVEL_COLORS[record.levelno] return logging.StreamHandler.format(self, record) + + +class FileKeeper(pyinotify.ProcessEvent): + def my_init(self, watched_handler, watched_file): + self._watched_handler = watched_handler + self._watched_file = watched_file + + def process_default(self, event): + if event.name == self._watched_file: + self._watched_handler.reopen_file() + + +class EventletThreadedNotifier(pyinotify.ThreadedNotifier): + + def loop(self): + """Eventlet friendly ThreadedNotifier + + EventletFriendlyThreadedNotifier contains additional time.sleep() + call insude loop to allow switching to other thread when eventlet + is used. + It can be used with eventlet and native threads as well. + """ + + while not self._stop_event.is_set(): + self.process_events() + time.sleep(0) + ref_time = time.time() + if self.check_events(): + self._sleep(ref_time) + self.read_events() + + +class FastWatchedFileHandler(logging.handlers.WatchedFileHandler, object): + """Frequency of reading events. + + Watching thread sleeps max(0, READ_FREQ - (TIMEOUT / 1000)) seconds. + """ + READ_FREQ = 1 + + """Poll timeout in milliseconds. + + See https://docs.python.org/2/library/select.html#select.poll.poll""" + TIMEOUT = 500 + + def __init__(self, logpath, *args, **kwargs): + self._log_file = os.path.basename(logpath) + self._log_dir = os.path.dirname(logpath) + super(FastWatchedFileHandler, self).__init__(logpath, *args, **kwargs) + self._watch_file() + + def _watch_file(self): + mask = pyinotify.IN_MOVED_FROM | pyinotify.IN_DELETE + watch_manager = pyinotify.WatchManager() + handler = FileKeeper(watched_handler=self, + watched_file=self._log_file) + notifier = EventletThreadedNotifier( + watch_manager, + default_proc_fun=handler, + read_freq=FastWatchedFileHandler.READ_FREQ, + timeout=FastWatchedFileHandler.TIMEOUT) + notifier.daemon = True + watch_manager.add_watch(self._log_dir, mask) + notifier.start() + + def reopen_file(self): + try: + # stat the file by path, checking for existence + sres = os.stat(self.baseFilename) + except OSError as err: + if err.errno == errno.ENOENT: + sres = None + else: + raise + # compare file system stat with that of our stream file handle + if (not sres or + sres[stat.ST_DEV] != self.dev or + sres[stat.ST_INO] != self.ino): + if self.stream is not None: + # we have an open file handle, clean it up + self.stream.flush() + self.stream.close() + self.stream = None + # open a new file handle and get new stat info from that fd + self.stream = self._open() + self._statstream() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo_log/log.py new/oslo.log-1.12.0/oslo_log/log.py --- old/oslo.log-1.11.0/oslo_log/log.py 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/oslo_log/log.py 2015-10-12 17:36:35.000000000 +0200 @@ -31,6 +31,7 @@ import logging.config import logging.handlers import os +import platform import sys try: import syslog @@ -311,7 +312,12 @@ logpath = _get_log_file_path(conf) if logpath: - filelog = logging.handlers.WatchedFileHandler(logpath) + if conf.watch_log_file and platform.system() == 'Linux': + file_handler = handlers.FastWatchedFileHandler + else: + file_handler = logging.handlers.WatchedFileHandler + + filelog = file_handler(logpath) log_root.addHandler(filelog) if conf.use_stderr: @@ -337,10 +343,10 @@ facility = _find_facility(conf.syslog_log_facility) # TODO(bogdando) use the format provided by RFCSysLogHandler after # existing syslog format deprecation in J - syslog = handlers.OSSysLogHandler( + syslog_handler = handlers.OSSysLogHandler( facility=facility, use_syslog_rfc_format=conf.use_syslog_rfc_format) - log_root.addHandler(syslog) + log_root.addHandler(syslog_handler) datefmt = conf.log_date_format for handler in log_root.handlers: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/oslo_log/tests/unit/test_log.py new/oslo.log-1.12.0/oslo_log/tests/unit/test_log.py --- old/oslo.log-1.11.0/oslo_log/tests/unit/test_log.py 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/oslo_log/tests/unit/test_log.py 2015-10-12 17:36:35.000000000 +0200 @@ -16,12 +16,14 @@ import logging import os +import platform import sys try: import syslog except ImportError: syslog = None import tempfile +import time import mock from oslo_config import cfg @@ -117,6 +119,7 @@ self.config = self.config_fixture.config self.CONF = self.config_fixture.conf log.register_options(self.CONF) + log.setup(self.CONF, 'base') class LogTestBase(BaseTestCase): @@ -660,6 +663,53 @@ self.assertEqual(None, self.conf.log_file) [email protected](platform.system() != 'Linux', + 'pyinotify library works on Linux platform only.') +class FastWatchedFileHandlerTestCase(BaseTestCase): + + def setUp(self): + super(FastWatchedFileHandlerTestCase, self).setUp() + + def _config(self): + os_level, log_path = tempfile.mkstemp() + log_dir_path = os.path.dirname(log_path) + log_file_path = os.path.basename(log_path) + self.CONF(['--log-dir', log_dir_path, '--log-file', log_file_path]) + self.config(use_stderr=False) + self.config(watch_log_file=True) + log.setup(self.CONF, 'test', 'test') + return log_path + + def test_instantiate(self): + self._config() + logger = log._loggers[None].logger + self.assertEqual(1, len(logger.handlers)) + self.assertIsInstance(logger.handlers[0], + handlers.FastWatchedFileHandler) + + def test_log(self): + log_path = self._config() + logger = log._loggers[None].logger + text = 'Hello World!' + logger.info(text) + with open(log_path, 'r') as f: + file_content = f.read() + self.assertTrue(text in file_content) + + def test_move(self): + log_path = self._config() + os_level_dst, log_path_dst = tempfile.mkstemp() + os.rename(log_path, log_path_dst) + time.sleep(2) + self.assertTrue(os.path.exists(log_path)) + + def test_remove(self): + log_path = self._config() + os.remove(log_path) + time.sleep(2) + self.assertTrue(os.path.exists(log_path)) + + class LogConfigOptsTestCase(BaseTestCase): def setUp(self): @@ -673,6 +723,7 @@ self.assertTrue('verbose' in f.getvalue()) self.assertTrue('log-config' in f.getvalue()) self.assertTrue('log-format' in f.getvalue()) + self.assertTrue('watch-log-file' in f.getvalue()) def test_debug_verbose(self): self.CONF(['--debug', '--verbose']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/requirements.txt new/oslo.log-1.12.0/requirements.txt --- old/oslo.log-1.11.0/requirements.txt 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/requirements.txt 2015-10-12 17:36:35.000000000 +0200 @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -pbr<2.0,>=1.6 +pbr>=1.6 Babel>=1.3 six>=1.9.0 iso8601>=0.1.9 @@ -12,3 +12,4 @@ oslo.utils>=2.0.0 # Apache-2.0 oslo.serialization>=1.4.0 # Apache-2.0 debtcollector>=0.3.0 # Apache-2.0 +pyinotify>=0.9.6 # MIT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/setup.cfg new/oslo.log-1.12.0/setup.cfg --- old/oslo.log-1.11.0/setup.cfg 2015-09-08 17:43:24.000000000 +0200 +++ new/oslo.log-1.12.0/setup.cfg 2015-10-12 17:37:17.000000000 +0200 @@ -5,7 +5,7 @@ README.rst author = OpenStack author-email = [email protected] -home-page = http://launchpad.net/oslo +home-page = http://www.openstack.org classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -23,6 +23,10 @@ packages = oslo_log +[extras] +fixtures = + fixtures>=1.3.1 + [pbr] warnerrors = true @@ -56,7 +60,7 @@ universal = 1 [egg_info] -tag_build = tag_date = 0 +tag_build = tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/setup.py new/oslo.log-1.12.0/setup.py --- old/oslo.log-1.11.0/setup.py 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/setup.py 2015-10-12 17:36:35.000000000 +0200 @@ -25,5 +25,5 @@ pass setuptools.setup( - setup_requires=['pbr>=1.3'], + setup_requires=['pbr>=1.8'], pbr=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/test-requirements.txt new/oslo.log-1.12.0/test-requirements.txt --- old/oslo.log-1.11.0/test-requirements.txt 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/test-requirements.txt 2015-10-12 17:36:35.000000000 +0200 @@ -5,7 +5,6 @@ hacking<0.11,>=0.10.0 discover -fixtures>=1.3.1 python-subunit>=0.0.18 testrepository>=0.0.18 testscenarios>=0.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-1.11.0/tox.ini new/oslo.log-1.12.0/tox.ini --- old/oslo.log-1.11.0/tox.ini 2015-09-08 17:42:40.000000000 +0200 +++ new/oslo.log-1.12.0/tox.ini 2015-10-12 17:36:35.000000000 +0200 @@ -14,6 +14,7 @@ VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt + -e.[fixtures] commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:pep8] @@ -26,7 +27,7 @@ commands = python setup.py build_sphinx [testenv:cover] -commands = python setup.py testr --coverage --testr-args='{posargs}' +commands = python setup.py test --coverage --coverage-package-name=oslo_log --testr-args='{posargs}' [flake8] # H803 skipped on purpose per list discussion.
