Skip to content

Commit

Permalink
Fixed pypo config file loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert Santoni committed Mar 12, 2015
1 parent 0f12362 commit cca9ba0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions python_apps/pypo/pypo/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ def configure_environment():

# configure logging
try:
logging.config.fileConfig("%s/logging.cfg" % os.path.dirname(os.path.realpath(__file__)))
logging.config.fileConfig("/etc/airtime/pypo_logging.cfg")
logger = logging.getLogger()
LogWriter.override_std_err(logger)
except Exception, e:
print "Couldn't configure logging"
print "Couldn't configure logging", e
sys.exit(1)

def configure_locale():
Expand Down
2 changes: 1 addition & 1 deletion python_apps/pypo/pypo/pypofetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


# configure logging
logging_cfg = os.path.join(os.path.dirname(__file__), "logging.cfg")
logging_cfg = "/etc/airtime/pypo_logging.cfg"
logging.config.fileConfig(logging_cfg)
logger = logging.getLogger()
LogWriter.override_std_err(logger)
Expand Down
3 changes: 2 additions & 1 deletion python_apps/pypo/pypo/pypofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from std_err_override import LogWriter

# configure logging
logging.config.fileConfig("%s/logging.cfg" % os.path.dirname(os.path.realpath(__file__)))
logging_cfg = "/etc/airtime/pypo_logging.cfg"
logging.config.fileConfig(logging_cfg)
logger = logging.getLogger()
LogWriter.override_std_err(logger)

Expand Down
3 changes: 2 additions & 1 deletion python_apps/pypo/pypo/pypomessagehandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
from std_err_override import LogWriter

# configure logging
logging.config.fileConfig("%s/logging.cfg" % os.path.dirname(os.path.realpath(__file__)))
logging_cfg = "/etc/airtime/pypo_logging.cfg"
logging.config.fileConfig(logging_cfg)
logger = logging.getLogger('message_h')
LogWriter.override_std_err(logger)

Expand Down
2 changes: 1 addition & 1 deletion python_apps/pypo/pypo/pypopush.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


# configure logging
logging_cfg = os.path.join(os.path.dirname(__file__), "logging.cfg")
logging_cfg = "/etc/airtime/pypo_logging.cfg"
logging.config.fileConfig(logging_cfg)
logger = logging.getLogger()
LogWriter.override_std_err(logger)
Expand Down

0 comments on commit cca9ba0

Please sign in to comment.