Logging

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Logging

Jesse Warden-2
n00b question; where do I see logs? I did this at the top:

import logging
#logging.basicConfig()
logging.basicConfig(level=logging.DEBUG,
           format='%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s')

And this in the bottom of my Django View:
services = {
    'highscores.logoutUser': logout_user,
    'highscores.loginUser': login_user,
'highscores.isLoggedIn': is_logged_in,

}

echoGateway = DjangoGateway(services, logger=logging)

...but all my Terminal window on my mac shows is this in purple every time my client makes a call:

[02/Apr/2011 13:04:54] "POST /gateway/ HTTP/1.1" 500 61581


_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Logging

Jesse Warden-2
I think I figured it out. I rtfm for both Python and Django. However, neither fixed it. It turns out Pyamf acts just like Amfphp; if something in your server-side code is whack, all you get is useless 500 error back.

Checking my code through the browser url yeilded the problem, I fixed it, and we're in business.  Sorry for the noise.

...btw, Nick, I know you're busy as all get out, but if you get bored, figure out someway to say like "you got a 500 error, here's why". Now that I know how to debug, no problem, but for n00bs, this is a major time sink.

On Sat, Apr 2, 2011 at 2:07 PM, Jesse Warden <[hidden email]> wrote:
n00b question; where do I see logs? I did this at the top:

import logging
#logging.basicConfig()
logging.basicConfig(level=logging.DEBUG,
           format='%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s')

And this in the bottom of my Django View:
services = {
    'highscores.logoutUser': logout_user,
    'highscores.loginUser': login_user,
'highscores.isLoggedIn': is_logged_in,

}

echoGateway = DjangoGateway(services, logger=logging)

...but all my Terminal window on my mac shows is this in purple every time my client makes a call:

[02/Apr/2011 13:04:54] "POST /gateway/ HTTP/1.1" 500 61581



_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Logging

Nick Joyce
That logging code _should_ have printed out the exception to the terminal I am curious as to why it didn't.

What version of Python/Django are you using and I'll try to recreate.

- Nick Joyce

On Saturday, 2 April 2011 at 2:01 PM, Jesse Warden wrote:

I think I figured it out. I rtfm for both Python and Django. However, neither fixed it. It turns out Pyamf acts just like Amfphp; if something in your server-side code is whack, all you get is useless 500 error back.

Checking my code through the browser url yeilded the problem, I fixed it, and we're in business.  Sorry for the noise.

...btw, Nick, I know you're busy as all get out, but if you get bored, figure out someway to say like "you got a 500 error, here's why". Now that I know how to debug, no problem, but for n00bs, this is a major time sink.

On Sat, Apr 2, 2011 at 2:07 PM, Jesse Warden <[hidden email]> wrote:
n00b question; where do I see logs? I did this at the top:

import logging
#logging.basicConfig()
logging.basicConfig(level=logging.DEBUG,
           format='%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s')

And this in the bottom of my Django View:
services = {
    'highscores.logoutUser': logout_user,
    'highscores.loginUser': login_user,
'highscores.isLoggedIn': is_logged_in,

}

echoGateway = DjangoGateway(services, logger=logging)

...but all my Terminal window on my mac shows is this in purple every time my client makes a call:

[02/Apr/2011 13:04:54] "POST /gateway/ HTTP/1.1" 500 61581


_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users


_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Logging

Jesse Warden-2
Latest greatest; installed Django via their ...uh... terminal thing, yesterday, 1.3. Python is 2.6.1.

To clarify, while I haven't gotten Django's uber-complicated logging syntax working (seriously, default to email? who the hell develops this shit.. .server-side guys? How gui racist can you get?), it DOES work just fine with prints statements... except for the 500 error, that just shows nothing.

On Sat, Apr 2, 2011 at 6:34 PM, Nick Joyce <[hidden email]> wrote:
That logging code _should_ have printed out the exception to the terminal I am curious as to why it didn't.

What version of Python/Django are you using and I'll try to recreate.

- Nick Joyce

On Saturday, 2 April 2011 at 2:01 PM, Jesse Warden wrote:

I think I figured it out. I rtfm for both Python and Django. However, neither fixed it. It turns out Pyamf acts just like Amfphp; if something in your server-side code is whack, all you get is useless 500 error back.

Checking my code through the browser url yeilded the problem, I fixed it, and we're in business.  Sorry for the noise.

...btw, Nick, I know you're busy as all get out, but if you get bored, figure out someway to say like "you got a 500 error, here's why". Now that I know how to debug, no problem, but for n00bs, this is a major time sink.

On Sat, Apr 2, 2011 at 2:07 PM, Jesse Warden <[hidden email]> wrote:
n00b question; where do I see logs? I did this at the top:

import logging
#logging.basicConfig()
logging.basicConfig(level=logging.DEBUG,
           format='%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s')

And this in the bottom of my Django View:
services = {
    'highscores.logoutUser': logout_user,
    'highscores.loginUser': login_user,
'highscores.isLoggedIn': is_logged_in,

}

echoGateway = DjangoGateway(services, logger=logging)

...but all my Terminal window on my mac shows is this in purple every time my client makes a call:

[02/Apr/2011 13:04:54] "POST /gateway/ HTTP/1.1" 500 61581


_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users


_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users



_______________________________________________
PyAMF users mailing list - [hidden email]
http://lists.pyamf.org/mailman/listinfo/users
Loading...