Commit ae568171b815e8548bf0304c18d1ae7210da6a91
1 parent
14dcbdca
add enable_logging, import logging from olefile
Showing
1 changed file
with
10 additions
and
2 deletions
oletools/ppt_parser.py
| ... | ... | @@ -37,12 +37,20 @@ import os |
| 37 | 37 | import cStringIO |
| 38 | 38 | |
| 39 | 39 | import thirdparty.olefile as olefile |
| 40 | -from olevba import get_logger | |
| 41 | 40 | import zlib |
| 42 | 41 | |
| 43 | 42 | |
| 44 | 43 | # a global logger object used for debugging: |
| 45 | -log = get_logger('ppt') | |
| 44 | +log = olefile.get_logger('ppt') | |
| 45 | + | |
| 46 | + | |
| 47 | +def enable_logging(): | |
| 48 | + """ | |
| 49 | + Enable logging for this module (disabled by default). | |
| 50 | + This will set the module-specific logger level to NOTSET, which | |
| 51 | + means the main application controls the actual logging level. | |
| 52 | + """ | |
| 53 | + log.setLevel(logging.NOTSET) | |
| 46 | 54 | |
| 47 | 55 | |
| 48 | 56 | #--- CONSTANTS ---------------------------------------------------------------- | ... | ... |