Skip to content

Flumotion/flog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This module does logging.

Suggested use in your project:

- embed the module
  - create myproject/extern directory
  - git submodule add git://github.com/Flumotion/flog myproject/extern/flog
  - cd myproject/extern
  - ln -sf flog/log .
  - git add log
  - git commit -m "adding flumotion log submodule"

- use it:
  - from myproject.extern.log import log
  - call log.init('MY_PROJECT_DEBUG')
    (where MY_PROJECT_DEBUG is the name of the environment 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.

BUGS
----

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.

About

Flumotion's logging module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages