2 Please remember that log files may contain plaintext passwords, etc.
 
   4 Please do not add print statements - at least do not commit them to git
 
   5 because in some environments printing to stdout causes errors
 
   7 Instead use python logging this way:
 
   8 --------------------------------
 
   9 #somewere on top of file
 
  13 logging.debug('this maybe works')
 
  14 logging.error('have big error!')
 
  16 logging.debug('') #this will add time, line number, function and file record 
 
  17 #sometimes useful record for call tracing on its own
 
  18 #etc - take a look at http://docs.python.org/library/logging.html
 
  19 -------------------------------
 
  21 in OSQA logging is currently set up in settings_local.py.dist
 
  22 please update it if you need - in older revs logging strings have less info
 
  24 messages of interest can be grepped out of the log file by module/file/function name
 
  25 e.g. to take out all django_authopenid logs run: 
 
  26 >grep 'osqa\/django_authopenid' log/django.osqa.log | sed 's/^.*MSG: //'
 
  27 in the example above 'sed' call truncates out a long prefix
 
  28 and makes output look more meaningful
 
  30 2) DJANGO DEBUG TOOLBAR
 
  31 osqa works with django debug toolbar
 
  32 if debugging under apache server, check 
 
  33 that debug toolbar media is loaded correctly
 
  34 if toolbar is enabled but you do not see it, possibly some Alias statement
 
  35 in apache config is wrong in your VirtualHost or elsewhere
 
  37 3) If you discover new debugging techniques, please add here.
 
  38 Possible areas to improve - at this point there is no SQL query logging,
 
  39 as well as request data and http header.