On Sunday 23 September 2007 06:54:38 Will wrote:
> On Sep 23, 10:25 am, Christopher Arndt <[EMAIL PROTECTED]> wrote:
> > "500 Internal error" is to unspecific an error message to get any idea
> > about the cause. Can you try to start your app in development mode (i.e.
> > set 'server.environment="development"' in your app's configuration file)
> > on the server? Then you'll get exception display and you could also
> > redirect the output to a log file and examine that later.
>
> Ah. I didnt realize that production environment would hide the stack
> trace. I guess you wouldn't want implementation details leaking out.
>
> With a stack trace I found the problem easily.
I've been thinking about that lately. I still haven't changed it, but our
production setup doesn't use the theoretical "server-errors.log" file for
anything except what *we* log as errors in our application.
I believe that it should be used for logging CP's errors and backtrace of
exceptions from CP as well.
And, maybe, we should ship our production log as a RotateFileHandler instead
of just a FileHandler and rotate its logfiles when they reach 1 MiB or 1 MB,
saving at most 99 copies of it. I don't know how to rotate logs using
logrotate for a TG application without restarting it to recreate the files
(i.e. copy & erase / move files to a different name for archiving). It isn't
everybody that has access to a syslog or other kind of logger that can do
that for them... For example, for 1 MB it would be:
[[[access_out]]]
# set the filename as the first argument below
args="('server.log','a',1000000,99,)"
class='RotatingFileHandler'
level='INFO'
formatter='message_only'
(I can commit this change if people think it would be useful to have this by
default.)
Many people might forget doing something like this and might end up with huge
logfiles standing on their disk.
At last, I also believe we should change the formatter to make the log
contents more like Apache's CLF log format and make it possible to use tools
such as webalizer to get statics from our logs and present it to the client
(who paid for the system or who asked the system to be coded). I don't know
how much control we have about this -- yet --, but it would be great.
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---