[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GMG-Devel] Trouble with paster
From: |
Christopher Allan Webber |
Subject: |
Re: [GMG-Devel] Trouble with paster |
Date: |
Tue, 15 Jul 2014 16:18:58 -0500 |
User-agent: |
mu4e 0.9.9.6pre2; emacs 24.3.1 |
address@hidden writes:
> On Thu, Jul 3, 2014, at 10:15 AM, Christopher Allan Webber wrote:
>> address@hidden writes:
>>
>> > Hi All,
>> >
>> > Our MediaGoblin instance seems to have trouble with paster. Restarting
>> > paster seems to bring our site back up. Where can I look for
>> > paster-related errors that may be causing our instance to go down?
>> >
>> > Regards,
>> >
>> > Jim
>>
>> Do you have any errors in the logs that may indicate what's causing it?
>>
>> (Note, we're likely moving away from paster soon anyhow with the python
>> 3 merge, but we should still try to help you in the meanwhile with this!)
>>
>> - Chris
>
> That was kind of my question. :) I searched for the logs, but didn't
> spot their location.
>
> Jim
Heya Jim,
Sorry for the super lame slow-to-response bit about this email.
So, it depends on your setup. Depending on how you set things up (like
in the default mediagoblin docs) your errors should be appearing in the
httpd error logs (nginx or apache or whatever).
However, if you're using something like uwsgi I think, you'll need to
set up a separate file logger. You can set up your own paste config,
and something like this:
#+BEGIN_SRC diff
diff --git a/paste.ini b/paste.ini
index 3c7eb17..ce3c5eb 100644
--- a/paste.ini
+++ b/paste.ini
@@ -24,14 +24,15 @@ config = %(here)s/mediagoblin_local.ini
%(here)s/mediagoblin.ini
keys = root
[handlers]
-keys = console
+keys = console, filelog
[formatters]
keys = generic
[logger_root]
level = INFO
-handlers = console
+handlers = console, filelog
[handler_console]
class = StreamHandler
@@ -39,6 +40,13 @@ args = (sys.stderr,)
level = NOTSET
formatter = generic
+[handler_filelog]
+class = FileHandler
+args = ('%(here)s/paste.log','a')
+level = NOTSET
+formatter = generic
+
+
[formatter_generic]
format = %(asctime)s %(levelname)-7.7s [%(name)s] %(message)s
#+END_SRC
You could also use a syslog handler or some such thing. Let me knwo if
you need help with that.
Again, sorry for the long delay on the reply!
- Chris