3
2

I observed that the osqa log is 0 bytes and not growing. This happened on two new installation on clean Ubunty 10.4

The permissions are right and there are no errors inside the apache logs.

Still I was expecting at least something in osqa log.

asked 03 Jul '10, 07:28

sorin's gravatar image

sorin
1.1k234447
accept rate: 11%

edited 03 Jul '10, 07:28


Beats me. Have no clue why it is empty, but it shouldn't be unless of course you never get any errors. A nice test would be to try to logging lib through a python command line and see if it works, then you can have a clue from where the error is coming from.

Example:

import logging
logging.basicConfig(filename='/home/hernani/test.log', level=logging.ERROR)
logging.error('a log message')

Then check the file (it does not need to exist before this). If it passes, try again using the file on the osqa installation under /log/django.osqa.log.

link

answered 03 Jul '10, 13:11

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.8k65975
accept rate: 52%

edited 03 Jul '10, 13:58

I have same problem as I mentioned in openid question. I'm new in python/django so can you please explain how to check logging?

(03 Jul '10, 13:16) Hameds

I edited the answer and added an example.

(03 Jul '10, 13:58) Hernani Cerq... ♦♦

I tried the example at it logs to stderr, not the file. I have a blank logfile too.

(03 Jul '10, 19:48) Joseph

Beats me then. The logging functions are core python.http://docs.python.org/library/logging.html

(04 Jul '10, 16:53) Hernani Cerq... ♦♦

Just remembered something, how's your apache LogLevel set to?

(06 Jul '10, 19:57) Hernani Cerq... ♦♦

Mine's empty as well, but this is while serving through python manage.py, not Apache.

(06 Jul '10, 20:40) jbwiv

that may be because you didn't got any errors to log. We only log errors, I don't think it's necessary to log every function call or whatever.

Anyway, it would be nice that the ones who want this fixed, to give us some more details, like which python version, etc

(06 Jul '10, 21:09) Hernani Cerq... ♦♦

Gotcha. That would make sense. Sorry, I'm coming from Rails where the default is to log everything when developing. And you're right...I just posted this (http://meta.osqa.net/questions/3368/error-with-postgresql-and-latest-version-of-osqa) about an error I'm getting...and guess what...it was logged properly ;-)

(06 Jul '10, 21:14) jbwiv
showing 5 of 8 show 3 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×156
×8

Asked: 03 Jul '10, 07:28

Seen: 519 times

Last updated: 06 Jul '10, 21:14

powered by OSQA