Canvas Logging

488 views
Skip to first unread message

kr...@novaware.com.au

unread,
Jan 31, 2014, 9:33:13 AM1/31/14
to canvas-l...@googlegroups.com
Hey Guys,

I had an awesome response to my last question so thought I would see if you guys can help again, I have had a look at a few of the forum posts for this issue already and so far found only one post from 2 years ago.

Currently my production.log file is sitting at a massive 246GB. So i've figured that our logging is set way to high and needs to be better adjusted.

I was wondering two questions.

1 - How can we clear the current log file so we can free up that space.
2 - How can we fix up the logging so that the issue does not happen again.

I am digging around in the config files now to see what I can find :)

Zach Pendleton

unread,
Jan 31, 2014, 10:39:52 AM1/31/14
to canvas-l...@googlegroups.com
Kris,

You can empty the current log file by running `cat /dev/null > /path/to/production.log` on your server. You can't adjust Canvas' logging verbosity, but you can rotate your logs by running something like logrotate (http://linux.die.net/man/8/logrotate) on your server. You probably already have it installed.

---
zachp


--
 
---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Steve Hillman

unread,
Jan 31, 2014, 11:29:16 AM1/31/14
to canvas-l...@googlegroups.com
The default log_level for Canvas is 'debug', which logs all of your SQL statements, among other things. It's probably more verbose than you need in your production environment. Add "  log_level: info" to your "production: " block in logging.yml and restart Canvas and you should get a lot less output for each request.

As someone else already suggested, also use logrotate, which is usually bundled with Linux, to rotate your log. You can either add it as a separate entity in /etc/logrotate.d or modify /etc/logrotate.d/httpd and add it to that file, since you'll want to restart Apache when you've rotated it anyway (which kills the running Canvas Ruby processes, causing them to close the old log file and open the new one)



--
 
---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Steve Hillman        IT Architect
hil...@sfu.ca       Institutional, Collaborative, & Academic Technologies (ICAT)
778-782-3960         Simon Fraser University

Kristopher Pickering

unread,
Feb 1, 2014, 1:11:43 AM2/1/14
to canvas-l...@googlegroups.com
This is exactly what I needed. Hopefully this can help others that run into the same issue :).

Really appreciate it :)


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "Canvas LMS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/canvas-lms-users/aspDbilI8X8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to canvas-lms-use...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Regards,

Kristopher Pickering Manager
P  03 8689 0056  |  M  0420 946 323  |  E kr...@novaware.com.au |  W  www.novaware.com.au

This communication may contain confidential or copyright information of Novaware (ABN 88 129 345 162).
If you are not an intended recipient, you must not keep, forward, copy, use, save or rely on this communication, and any such action is unauthorised and prohibited. If you have received this communication in error, please reply to this email to notify the sender of its incorrect delivery, and then delete both it and your reply.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages