Commit Graph

639 Commits

Author SHA1 Message Date
Andreas Jaeger 5ef6f8015d Retire repo
This repo was created by accident, use deb-python-oslo.log
instead.

Needed-By: I1ac1a06931c8b6dd7c2e73620a0302c29e605f03
Change-Id: I81894aea69b9d09b0977039623c26781093a397a
2017-04-17 19:37:22 +02:00
OpenStack Proposal Bot 8a3fdb3b39 Updated from global requirements
Change-Id: If955579506221ffbed63e41b4eb70144cbe56da8
2016-08-08 10:47:03 +00:00
OpenStack Proposal Bot 7757808a34 Updated from global requirements
Change-Id: Idc3335a62ef148f8dd1fe273711a44c41fe91bf2
2016-08-04 02:40:44 +00:00
OpenStack Proposal Bot 656cef3e3b Updated from global requirements
Change-Id: I43fd129eba81f7f0bf0cb3b159390f0c137d6021
2016-07-29 02:33:52 +00:00
yan.haifeng 92b6ff6c26 Fix parameters of assertEqual are misplaced
Many assertEqual sentences don't follow assertEqual(expected, actual),
this patch fix all of them.

Closes-Bug: 1604213

Change-Id: I830435ab860c7298cea64a24ef01df3e5326d00c
2016-07-21 15:06:19 +00:00
OpenStack Proposal Bot 12de1274b3 Updated from global requirements
Change-Id: I3922282904985f709ecc467ac103d0842c143d60
2016-07-18 18:14:36 +00:00
Thomas Bechtold 8cb90f4b16 Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: I2ef4e129417754af2ab6248fb583d8766b0db97d
2016-07-14 08:11:42 +02:00
ChangBo Guo(gcb) 3ae0e8732c Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: I4be37bf1a97bf76a2302a4f16999e6464665dc21
2016-07-12 15:46:54 +08:00
Jenkins daf64383c1 Merge "Reload log_config_append config on SIGHUP" 2016-07-11 16:55:50 +00:00
liangjingtao c426a42ccd Replace "LOG.exception(_" with "LOG.exception(_LE"
Follow http://docs.openstack.org/developer/oslo.i18n/guidelines.html:
If a common message is not being used, they should each betreated
separately with respect to choosing a marker function.So this patch
is to fix it.

Change-Id: I07945d82320d9faf6dc452d49722af610330b441
Closes-Bug: #1600788
2016-07-11 20:13:38 +08:00
OpenStack Proposal Bot 5082d92e51 Updated from global requirements
Change-Id: Ibbf288c7c8f2bc2e3398a6251ac6c578d567e0e7
2016-07-09 19:25:52 +00:00
Jenkins 6f7c4584c6 Merge "log: Introduce _iter_loggers" 2016-07-06 17:50:40 +00:00
Alexis Lee 8fde280b86 Reload log_config_append config on SIGHUP
On SIGHUP the mutate_hook will be called. Call fileConfig to
reconfigure logging if log-config-append changes or the timestamp of
the file it points to changes.

Implements: bp mutable-logging
Change-Id: I8ca8e6b4e9218f3a2edaf9ecf53653d829bc0c12
2016-07-06 17:46:46 +01:00
OpenStack Proposal Bot e4c651b9a7 Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I4d50ee4e93f61f0e3a892b34bba11442c7c3d41e
2016-07-01 06:28:23 +00:00
OpenStack Proposal Bot e3bd7e6af5 Updated from global requirements
Change-Id: I93447e6e7675dc33113efa1413d3db349a68a0ed
2016-06-30 18:48:22 +00:00
Alexis Lee fc490c03b7 log: Introduce _iter_loggers
Ic58dafceefde1b109721a58631c223522bf4cc9c introduces this function
for Victor's rate_limit module. I also want it for my global_filter
and mutable logging config patches so it seems sensible to have it
centrally and reuse it.

Change-Id: I9571badcfc437fb7d565d8dc9632792862e20b3f
Co-Authored-By: Victor Stinner <vstinner@redhat.com>
2016-06-29 11:07:44 +01:00
OpenStack Proposal Bot 15ef5855fe Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I0eeb8b4fcbb6fb0c638b3a8ee04dfd76c3305955
2016-06-25 06:28:02 +00:00
OpenStack Proposal Bot 1bea3a5711 Updated from global requirements
Change-Id: Idaf7e02e723ddcbd7ea37eeac3c81700f37af470
2016-06-24 03:16:33 +00:00
OpenStack Proposal Bot 68bde95980 Updated from global requirements
Change-Id: Iacfb572244bc45256cc423f688b3b9e3f4764221
2016-06-21 18:04:24 +00:00
Jenkins 54fbbffeb7 Merge "Provide a normal method for deprecation warnings." 2016-06-15 18:51:07 +00:00
OpenStack Proposal Bot b694235dcc Updated from global requirements
Change-Id: I370039140df99aafa58e883a4b1b64377281cfae
2016-06-08 22:03:00 +00:00
Jenkins 30745ebc69 Merge "log: don't create foo.log" 2016-06-08 20:06:30 +00:00
Jamie Lennox c27cbd8dd8 Provide a normal method for deprecation warnings.
The deprecated decorator is very useful in situations where you have a
complete function that you want to deprecate. However it doesn't let me
simply trigger a deprecation warning in a code path that i know is
deprecated but doesn't exist in a function.

Create a standard deprecated warning function that has almost the same
signature (what becomes required) and produces the same warning and
fatal_deprecations behaviour for situations where a deprecator is not
useful.

For example:

    if CONF.deprecated_value:
        versionutils.deprecated_warning('deprecated_value',
                                        as_of=versionutils.OCATA)
        # do stuff

Change-Id: Ifd83cd74ac397e7bc6def11a38b46de5dff2acfa
Closes-Bug: #1590223
2016-06-08 13:09:56 +10:00
OpenStack Proposal Bot 070cc7ae8d Updated from global requirements
Change-Id: I1b13196ec6b8a65d081ea6d8b4a1ff0a166a798f
2016-06-03 18:17:59 +00:00
Jenkins e2141f5460 Merge "Make available to log encoded strings as arguments" 2016-06-03 02:04:00 +00:00
Andrey Volkov 991d8f0a12 Make available to log encoded strings as arguments
Pure python logging library allows to log encoded strings
but in oslo_log it causes UnicodeDecodeError for arguments
which contains unicode symbols.

Changes add additional check whether all arguments can be converted to
unicode. If it isn't possible then leave it as is.

Change-Id: I76e75c35a74b146fae52c0ea60156e1cf78540e7
Closes-Bug: #1563295
2016-06-02 18:16:09 +03:00
Jenkins f0f4fef812 Merge "Updated from global requirements" 2016-06-02 10:07:26 +00:00
OpenStack Proposal Bot 5c551893aa Updated from global requirements
Change-Id: I5ab8b47d78d62d010f2979c4ce60af577fa34b93
2016-06-01 13:53:12 +00:00
Edan David 3e3471fc87 Fix typo: 'Olso' to 'Oslo'
Change-Id: I0fe4ae23bf6fe7e01b6e935a6c766141393fc805
2016-06-01 02:17:56 -04:00
OpenStack Proposal Bot 3b45fbc34a Updated from global requirements
Change-Id: If4bd8abf961edc32cb92c8030f528c6995b8639b
2016-05-31 03:05:18 +00:00
Jenkins a22f3d40fc Merge "Use new logging specific method for context info" 2016-05-30 19:13:19 +00:00
Jenkins 054da3dc3f Merge "Improve olso.log test coverage for edge cases" 2016-05-30 19:06:45 +00:00
Francois Deppierraz 93dd44f857 Convert unicode data to utf-8 before calling syslog.syslog()
Without this patch no conversion was taking place and message containing
special characters were raising TypeError exceptions. Just like the following
example:

>>> import syslog
>>> syslog.syslog(syslog.LOG_DEBUG, u"kaboom")
>>> syslog.syslog(syslog.LOG_DEBUG, u"François Deppierraz")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: [priority,] message string
>>>

Change-Id: I7557e016e8b9894033953bee689c79484c4a11f3
Closes-Bug: #1483842
2016-05-27 15:38:56 +02:00
Alexis Lee 2a147c54a2 log: don't create foo.log
test_tempest_set_log_file was calling tempest_set_log_file and never
resetting this value. That caused some other test to create foo.log
and not clean it up.

Change-Id: I23efe8fb89531752b01bdf9c0fbdc39c77058a51
2016-05-27 10:17:24 +01:00
OpenStack Proposal Bot ea4b9d0105 Updated from global requirements
Change-Id: I66cdd51bbb8d3751275e616b681ad79913cb2f1a
2016-05-26 17:03:52 +00:00
Ronald Bradford 77355b1e72 Use new logging specific method for context info
Use new dedicated method for context aware attributes in oslo.log which
will enable future improvements for common and project specific logging
format parameters. Fall back to legacy method if not found in passed
context object and provide a deprecated warning of missing method.

Change-Id: Ica445ad5dfe9bd27dfcf1b1bcb6401a0bc9496a5
Implements: blueprint app-agnostic-logging-parameters
Depends-On: I963a6db4aef74f7348e75a642e2e195cedacecaa
Depends-On: I5450e105dc914f822a2b4c03b759a682d8b4a3e7
Depends-On: I9025770693d4b15efe4bd3556e6704326b1c915e
2016-05-24 09:45:11 -04:00
Kevin Benton 6a36cffd9f Reduce READ_FREQ and TIMEOUT for watch-file
The watch-file option currently relies on pyinotify which makes
use of select.poll. This is eventlet incompatible so it blocks
the whole thread for TIMEOUT milliseconds every READ_FREQ seconds.

This meant that an agent/service using this option is blocked for
500 milliseconds every 1 second.

Until a non-blocking alternative can be found, this adjusts the
READ_FREQ and TIMEOUT params on the FastWatchedFileHandler to
3 and 5 respectively. So every 3 seconds, it will block for 5
milliseconds so only 0.16% of time is lost instead of 50%.

Change-Id: I6fdc0a3f1eaae39eb86440c6c4b07ca8d91f2462
Partial-Bug: #1583270
2016-05-13 02:05:31 -07:00
Joshua Harlow ed582b1087 Revert "Remove 'verbose' option"
This reverts commit 7c671ea77f.

This one is causing to many issues in consuming projects
to just yet remove (even though its been deprecated for two
cycles).

Change-Id: I5486b0fe1c55f41aed5fb209214adeaca03a64fb
2016-05-16 21:43:58 -07:00
Dmitry Tantsur 07c3c287f7 Fix regression causing the default log level to become WARNING
Change I96229438d3a2271c830bcd926326e7b4a94ccac9 removed the verbose option
in the opposite fashion from what how it was intended when the option was
deprecated. It regressed the default log level back to WARNING.
See change I306535c6ca5dbdaf9398b44697578a3a30e52111 for original reasoning
behind this deprecation. This change fixes the default level as it was
intended.

Change-Id: Ia9cd55004ce05761de733adae00554ff021794a8
2016-05-15 11:20:25 +02:00
Alexis Lee 7c671ea77f Remove 'verbose' option
This was already deprecated in Mitaka, we're now working on Newton so
I believe it can be removed.

Change-Id: I96229438d3a2271c830bcd926326e7b4a94ccac9
2016-05-11 14:00:45 +01:00
Jenkins c6c114e740 Merge "Fix example issue" 2016-05-05 14:14:16 +00:00
yan.haifeng c63991fb4d Fix example issue
example LOG.exception("An Exception occurred") in both usage.py,
usage_helper.py and usage_i18n.py failed when use py34.

fix it by raising exception before calling LOG.exception().

Change-Id: I2b6ea35fbf171232fea0cc54265f8be3dc61457f
Closes-Bug: #1578071
2016-05-05 09:30:17 +08:00
Jenkins 440a3c2267 Merge "Allow reload of 'debug' option" 2016-05-04 13:38:38 +00:00
OpenStack Proposal Bot 12f03d4cf6 Updated from global requirements
Change-Id: I337a1d80948419230721a63df4c279304ef6e074
2016-04-28 16:16:08 +00:00
Alexis Lee 641803668a Allow reload of 'debug' option
Ie9e9a895da1a3fc62580c1febb7cd9f965bbc0f5 adds a 'mutate' flag to
options. This is the first patch to use this functionality. It marks the
'debug' option as mutable and registers '_mutate_hook' to be called
when mutate_config_files runs.

Option 'verbose' is deprecated for removal so I see no need to mark it
mutable even though it's closely related.

Change-Id: I1e7a69de169cc85f4c09954b2f46ce2da7106d90
Depends-On: Ied006631a6edbeeffae485d28eff700b13a626c1
Depends-On: I9bb2ff39dc1ed0a63bd7e7635704b34c53d32d79
2016-04-21 15:12:26 +01:00
OpenStack Proposal Bot 4f1ae84047 Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I0c5051ab01e3feb83b8dea3136975db69c500f5f
2016-04-21 06:09:03 +00:00
Joshua Harlow 273ef5378e Remove direct dependency on babel
The dependency on oslo.i18n already forces this requirement.

Change-Id: Iec47bcb18fd57e78de0bf5af582b9c7cd34cf7e9
2016-04-18 13:23:47 -07:00
OpenStack Proposal Bot 3b1d0f5ffb Updated from global requirements
Change-Id: I7f96bf955bbd2360bd17610a8af6b2605c37b10e
2016-04-13 12:47:30 +00:00
OpenStack Proposal Bot 225828f690 Updated from global requirements
Change-Id: Id28e6727483257ec8ff5b536efa13a9892f1a958
2016-04-08 00:32:05 +00:00
OpenStack Proposal Bot 5d9c9f0dc3 Updated from global requirements
Change-Id: I9025770693d4b15efe4bd3556e6704326b1c915e
2016-04-02 16:16:18 +00:00