Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gnunicorn/flu-log-mirror
a very simple mirror of the flumotion.extern.log-module for easier git-submoduling
https://github.com/gnunicorn/flu-log-mirror
Last synced: 2 days ago
JSON representation
a very simple mirror of the flumotion.extern.log-module for easier git-submoduling
- Host: GitHub
- URL: https://github.com/gnunicorn/flu-log-mirror
- Owner: gnunicorn
- Created: 2009-07-21T14:31:37.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-07-09T09:21:17.000Z (over 14 years ago)
- Last Synced: 2024-11-17T08:13:57.444Z (2 months ago)
- Language: Python
- Homepage:
- Size: 137 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: ChangeLog
Awesome Lists containing this project
README
This module does logging.
Suggested use in your project (if you are using Subversion):
- create myproject/extern directory
- svn commit myproject/extern
- svn propset svn:externals "log https://core.fluendo.com/svn/flumotion/trunk/flumotion/extern/log" myproject/extern
- in your project:
- call log.init('MY_PROJECT_DEBUG')
(where MY_PROJECT_DEBUG is the name of the enviroment variable you want
to have the debug output controlled by)
- call log.setPackageScrubList('myproject')
to have the filename logging be relative to your myproject package/module.
- call log.setDebug(myDebugString) to change the logging levels.Alternatively, you can embed only the log.py file with proper svn:externals.
If you are worried about stability, check out a specific revision by
putting -r (revision number) in between log and httpsBUGS
----The logging strings should be strings, not unicode.
Unicode objects are encoded with UTF-8 before being logged.
log.getExceptionMessage() is not always able to extract the stack properly;
there doesn't seem to be a good way to do so.
Instead, it will take the stack from the last raise context, so call
this function before passing the exception down somewhere else where it
could hit another raise first.