where's my django application log file?

February 9, 2016 16.3k views
Django Monitoring Nginx API

For the one-click appplications.. where are the django application log files? I can only see nginx files but I can not see application level exceptions/errors there..

2 Answers
asb MOD February 9, 2016
Accepted Answer

The Django One-Click application employs Gunicorn and Upstart. Application level logging can be found in /var/log/upstart/gunicorn.log By default, Gunicorn logs to stderr and Upstart will collect output to stderr/stdout in /var/log/upstart/$JOB_NAME.log This can be adjusted by adding --access-logfile path/to/file to Gunicorn's options in /etc/init/gunicorn.conf or by implementing logging directly in your Django application.

  • /var/log/upstart/ doesn't exist anymore

  • I tried this, but I don't have an "upstart" dir in /var/log/?

    ls -a shows the following

    alternatives.log  
    auth.log    
    auth.log.2.gz  
    cloud-init.log         
    dist-upgrade  
    fsck      
    kern.log.1     
    lxd     
    syslog.1     
    syslog.3.gz  
    syslog.5.gz  
    syslog.7.gz  
    ufw.log.1     
    unattended-upgrades
    ..  
    .
    apt               
    auth.log.1  
    btmp           
    cloud-init-output.log  
    dpkg.log      
    kern.log  
    kern.log.2.gz  
    syslog  
    syslog.2.gz  
    syslog.4.gz  
    syslog.6.gz  
    ufw.log      
    ufw.log.2.gz  
    wtmp
    

/var/log/
nano syslog

  • Very useful info, thanks! I simply downloaded it to my pc.

    As root: 7z a /var/log/syslog.7z /var/log/syslog and then download /var/log/syslog.7z. You have to install 7zip first.

Have another answer? Share your knowledge.