SolidCharity / LightBuildServer

LightBuildServer for building rpm and deb packages and running CI scripts, using linux containers
BSD 3-Clause "New" or "Revised" License
11 stars 1 forks source link

catch all errors: otherwise no error message in /var/log/uwsgi.log #112

Open tpokorra opened 9 years ago

tpokorra commented 9 years ago

I had a problem loading the log files, with encoding. No error showed in the uwsgi log file. output was just "internal server error", code 500

tpokorra commented 8 years ago

see https://docs.python.org/2.6/library/logging.html

import logging; 
....
def processbuildqueue(self):
  try:
    self.LBS.ProcessBuildQueue()
  except:
    logging.error("Unexpected error:", sys.exc_info()[0])
    logging.error(sys.exc_info())

This now goes to uwsgi.log file