... and raise an exception when the feature is explicitly requested.
The feature has been broken for some time, and depends on pyinotify
library which has been unmaintained for long time and is not compatible
with python 3.12 (because it uses asyncore).
Related-Bug: #1740111
Closes-Bug: #2059855
Change-Id: I209b1260ed4de64cbfc561a1da81a66f7a5ea397
Introduced changes:
- pre-commit config and rules.
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.
Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.
pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker
(check-byte-order-marker);
- Checks that non-binary executables have a proper
shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings
(check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)
For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks
Change-Id: I6663d5e0866e03f8eb8c0543d3e3e0bbfb2399ac
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Remove these requirements from lower-constraints, they are not needed
during installation.
openstackdocstheme renames some variables, so follow the renames. A
couple of variables are also not needed anymore, remove them.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: I26d5cf722635d12c3cdfde6ec25b0d3e16377b2f
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045
Change-Id: Icbc670ba49e0cf9e1ce33b33a16231ec64ddf042
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.
Change-Id: I61f26bed7831cdcce1f33f3981c3e97b018c4c42
Incubator logging has been gone for years. Nobody still needs these
docs, and on the off chance that I'm wrong they're still available
in git.
Change-Id: I4757f93c4194bd821232a2f6cc9abf3be00f15d0
Convert the logging guidelines from the previous cross-project spec:
https://specs.openstack.org/openstack/openstack-specs/specs/log-guidelines.html
so that they read as documentation rather than a spec, in order to
encourage developers down the right lines.
Also port a section on variable interpolation from oslo.i18n. It was
misplaced there because it wasn't specific to i18n, and anyway logs
are no longer translated so it had to be removed from there by
Ib86013ff5e7b.
Change-Id: I3b8299b7a53e9e22c507930aa7a37c81ebcd580e
Translation of log messages was ceased starting with Pike, but only
the oslo.i18n documentation was only partially updated (by
Ia34ad79ca9), and not this repository.
So remove misleading examples of log translation from this
documentation.
Change-Id: Ib86013ff5e7bd07ddc696da2e4c56ce9d07f0cb6
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: I67c50430ced6efcc2f29ec7d8adc871415922d6f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Bandit 1.6.0 accidentally changed how to exclusion list option is
handled and breaks our use of it. Cap to the previous version until
bandit has has fixed the problem.
Sphinx 2.0 no longer works on python 2.7, so need to start capping it
there as well.
Limit monotonic to python < 3.3 and reflect the changes to
openstack/requirements introduced
in change Ib8c1bf08f5fa7463911602b0df19315907c81e04.
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Co-Authored-By: Hervé Beraud <hberaud@redhat.com>
Change-Id: I4c2a19fae55e8cfea2d5ae9603a1fb086b5db1bf
Just a couple of doc things that became out of date due to some
code changes during the review process.
Change-Id: I5820f7940d8d32546174da132db5be5a209a2200
On Windows, in-use files cannot be moved or deleted. For this reason,
we need the service itself to take care of rotating logs.
For convenience reasons, we're exposing the built-in rotating log
handlers through a set of config options.
More specifically, we're adding the following new config options:
- log_rotate_interval
- log_rotate_interval_type
- max_logfile_count
- max_logfile_size_mb
Change-Id: I01db4efc08e2cb64db9cbf793f3a159f54859fe7
Closes-Bug: #1802262
Incorporate some of the information from the upstream docs here and add
information about a few of our custom message parameters.
Change-Id: Ib6f934e7f5d6e43afa8021241f92000c644c5e6d
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Upstream python-systemd has a journald logging handler that also adds
some exception information, as well as thread information.
https://github.com/systemd/python-systemd/blob/master/systemd/journal.py#L581-L589
While OpenStack doesn't use a lot of threads, we might as well support it
since it's no cost. Also, add PROCESS_NAME just to be compatible with
other programs that might use python journald logging. Not entirely sure
if record.processName and the results of our self.binary_name will be
different.
The exception info is the fun stuff though.
Change-Id: Ibf0d7dae7587639737e0327f0338f30cdfc6aba1
This change implements FluentFormatter, a formatter for fluentd.
It enables oslo_log to output logs to fluentd directly.
FluentFormatter expects it will be used by fluent.handler.FluentHandler.
DocImpact
Implements: blueprint fluent-formatter
Change-Id: I67be5079f9370e93e5e3d4c715d2b8011154a2ce
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
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
Also cleaned up set_default example syntax, to help other projects
to implement consistently. Ensured example code passed flake8.
Created a dedicated examples page and applicable links to enable
viewing and download capability of examples.
Change-Id: Idd16321110df824dc89faf86a2cf9f47f38d1f4f
Depends-on: I6f92b525c6d0bdf71b01d3ac89d537b458d17e6f
Added examples to explain how to implement Oslo Logging
and to show how it interacts with Oslo Config and i18n.
Revised configuration option help (and order) to provide a better
documented Configuration Options page
Change-Id: Idf4a8788f887ba07fe1b3604e06b165366b2c808
Especially needed for all the HyperV work on windows.
Depends-On: I1a0a2dacbefa548296a6cfef1663ea9d48253c0c
Change-Id: Ifcc854e6eb6f4d0e575d1489f0d00f3339705e0b
Add automatically generated documentation for the configuration options
using oslo_config.sphinxext.
Change-Id: I8a58303b09aa5b0c04c083c85d50b87e3efe28e0
Add extra 'fixture' section so that projects needing to use
oslo_log.fixture can add 'oslo.log [fixture]' to their
requirements to install the fixture dependencies
Closes-Bug: #1493976
Change-Id: I67f3f59c50627a41b672928d037a7bd9997caa11
There were several examples showing passing an
exception in as the message text to a call to
LOG.exception. LOG.exception will automatically
log the exception details, so doing something
like this results in the exception information
being written out twice.
To prevent the possibility of someone seeing these
examples and assuming that is the correct way to
use LOG.exception, examples have been updated to
use LOG.error instead to illustrate the correct
way to pass in exceptions in the message string.
Change-Id: I582008609180a02eaff3d85bee5b5ca4381719ce
Add an automodule directive for the new module.
Clean up the existing docstring so it renders a bit more nicely.
Update the usage page to refer to the new location of versionutils.
Change-Id: Ib732509186e56ed2b39638129e2ec4272da1aa9d
Also makes the docs look more like the other
oslo libraries so that the content is easily readable
across projects.
Change-Id: Ic9837b59d194331c604b2ceddc118f2b1c5093f1