Configured a separate error log where tracebacks go. Should work on all platforms.
This commit is contained in:
parent
0711295789
commit
fed6bb7b9d
|
@ -3,6 +3,7 @@ syntax: glob
|
|||
*.swp
|
||||
*~
|
||||
luminotes.log
|
||||
luminotes_error.log
|
||||
luminotes.db
|
||||
session/*
|
||||
files/*
|
||||
|
|
|
@ -9,7 +9,7 @@ settings = {
|
|||
"session_filter.timeout": 60 * 24 * 365, # one year
|
||||
"static_filter.root": os.getcwd(),
|
||||
"server.log_to_screen": False,
|
||||
"server.log_file": "luminotes.log",
|
||||
"server.log_file": "luminotes_error.log",
|
||||
"server.log_access_file": "luminotes.log",
|
||||
"server.log_tracebacks": True,
|
||||
"luminotes.launch_browser": True,
|
||||
|
|
|
@ -8,7 +8,7 @@ settings = {
|
|||
"base_url_filter.on": True,
|
||||
"base_url_filter.use_x_forwarded_host": True,
|
||||
"server.log_to_screen": False,
|
||||
"server.log_file": "luminotes.log",
|
||||
"server.log_file": "luminotes_error.log",
|
||||
"server.log_access_file": "luminotes.log",
|
||||
"server.log_tracebacks": True,
|
||||
},
|
||||
|
|
|
@ -391,7 +391,7 @@ class Root( object ):
|
|||
|
||||
import traceback
|
||||
if not self.__suppress_exceptions:
|
||||
traceback.print_exc()
|
||||
cherrypy.log( traceback.format_exc() )
|
||||
self.report_traceback()
|
||||
|
||||
import sys
|
||||
|
|
|
@ -75,11 +75,15 @@ def main( args ):
|
|||
|
||||
sys.exit( 0 )
|
||||
|
||||
# remove the existing log file, if any
|
||||
# remove the existing log files, if any
|
||||
try:
|
||||
os.remove( "luminotes.log" )
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
os.remove( "luminotes_error.log" )
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
socket.setdefaulttimeout( SOCKET_TIMEOUT_SECONDS )
|
||||
|
||||
|
|
Reference in New Issue