mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 13:53:15 -07:00
added logging of environment variables. Helps #455
This commit is contained in:
parent
16e8be1a35
commit
8172c37dac
2 changed files with 9 additions and 1 deletions
|
@ -17,6 +17,8 @@
|
|||
log_debug = 0
|
||||
# Enable/Disable logging database messages to nzbtomedia.log
|
||||
log_db = 0
|
||||
# Enable/Disable logging environment variables to nzbtomedia.log (helpful to track down errors calling external tools.)
|
||||
log_env = 0
|
||||
# Set to where your ffmpeg/ffprobe executables are located
|
||||
ffmpeg_path =
|
||||
# Enable/Disable media file checking using ffprobe.
|
||||
|
|
|
@ -63,6 +63,7 @@ NZBGET_POSTPROCESS_NONE = 95
|
|||
CFG = None
|
||||
LOG_DEBUG = None
|
||||
LOG_DB = None
|
||||
LOG_ENV = None
|
||||
SYS_ENCODING = None
|
||||
|
||||
AUTO_UPDATE = None
|
||||
|
@ -187,7 +188,7 @@ def initialize(section=None):
|
|||
NICENESS, LOG_DEBUG, FORCE_CLEAN, FFMPEG_PATH, FFMPEG, FFPROBE, AUDIOCONTAINER, EXTCONTAINER, TORRENT_CLASS, \
|
||||
DELETE_ORIGINAL, PASSWORDSFILE, USER_DELAY, USER_SCRIPT, USER_SCRIPT_CLEAN, USER_SCRIPT_MEDIAEXTENSIONS, \
|
||||
USER_SCRIPT_PARAM, USER_SCRIPT_RUNONCE, USER_SCRIPT_SUCCESSCODES, DOWNLOADINFO, CHECK_MEDIA, SAFE_MODE, \
|
||||
TORRENT_DEFAULTDIR, NZB_DEFAULTDIR, REMOTEPATHS
|
||||
TORRENT_DEFAULTDIR, NZB_DEFAULTDIR, REMOTEPATHS, LOG_ENV
|
||||
|
||||
if __INITIALIZED__:
|
||||
return False
|
||||
|
@ -242,6 +243,11 @@ def initialize(section=None):
|
|||
# Enable/Disable DEBUG Logging
|
||||
LOG_DEBUG = int(CFG['General']['log_debug'])
|
||||
LOG_DB = int(CFG['General']['log_db'])
|
||||
LOG_ENV = int(CFG['General']['log_env'])
|
||||
|
||||
if LOG_ENV:
|
||||
for item in os.environ:
|
||||
logger.info("%s: %s" % (item, os.environ[item]), "ENVIRONMENT")
|
||||
|
||||
# initialize the main SB database
|
||||
nzbToMediaDB.upgradeDatabase(nzbToMediaDB.DBConnection(), mainDB.InitialSchema)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue