Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to get python tracebacks into production log?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ksenia  
View profile  
 More options Jan 14 2007, 8:14 am
From: "Ksenia" <ksenia.marasan...@gmail.com>
Date: Sun, 14 Jan 2007 05:14:45 -0800
Local: Sun, Jan 14 2007 8:14 am
Subject: How to get python tracebacks into production log?
Hi people,

Two problems:

1) It seems to me that by default quickstarted project in production
does not log python tracebacks into server log. I tried to change
logging configuration but it didn't help, the only way i could get
traceback is  by setting server.environment to "development".

2) When  TG process started with start-stop-daemon, there is no log...
at all. My script is started as follows:

start-stop-daemon --chuid $USER --start --pidfile $PIDFILE \
         --chdir $APP_PATH --background --make-pidfile --startas
$DAEMON -- $CONFIG

(where APP_PATH is TG applicaiton path and DAEMON is the start-app.py
script)

The only way I could get logfile in this case was completely removing
logging configuration from prod.cfg and removing log.cfg.

Does anybody have a working example of production logging config that
logs traceback?! That would be very helpful.

Thanks a lot,

Ksenia


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Chu  
View profile  
 More options Jan 15 2007, 2:02 pm
From: Jason Chu <j...@xentac.net>
Date: Mon, 15 Jan 2007 11:02:28 -0800
Local: Mon, Jan 15 2007 2:02 pm
Subject: Re: [TurboGears] How to get python tracebacks into production log?

On Sun, 14 Jan 2007 05:14:45 -0800

I had to fiddle with it for quite a while, but here is something that
outputs tracebacks.  Change the [[[fatboy]]] and qualname='fatboy' to
whatever your project name is.

I believe the tracebacks happen in cherrypy.msg.  This is only for
errors, it doesn't display anything like an access_log.  I think you'll
have to fiddle around with the access_out directive for that.

Jason

[logging]

[[formatters]]
[[[full_content]]]
format='*(asctime)s *(name)s *(levelname)s *(message)s'

[[handlers]]

#[[[access_out]]]
## set the filename as the first argument below
#args="('server.log',)"
#class='FileHandler'
#level='INFO'
#formatter='full_content'

[[[error_out]]]
args="('server.log',)"
class='FileHandler'
level='DEBUG'
formatter='full_content'

[[loggers]]
[[[fatboy]]]
level='DEBUG'
qualname='fatboy'
handlers=['error_out']

[[[access]]]
level='INFO'
qualname='cherrypy.msg'
handlers=['error_out']
#propagate=0

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »