Logging to file or rsyslog #5514
-
Using the sample stanza in the docs I'm getting no logs to /var/log/netbox.log. I'm thinking permissions but so far no clues. I touched the file and chowned it netbox, still nothing. Has anyone got this to work with rsyslog? Or should it already out of the box? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I presume you mean the documentation here ? Firstly, there's nothing to do with rsyslog. This is just django writing to files. Secondly, you will probably find that if you browse to a random URL like http://your.net.box/asdfasdf then you'll get a log like this:
Nothing is logged when you browse pages, but this is normal. Logger For more info, see the Django documentation examples and loggers, and also stackoverflow:
I tested with the following config:
and I pre-created the log directory:
On restarting netbox, the log file was created automatically (zero bytes), but only errors are logged. |
Beta Was this translation helpful? Give feedback.
-
This is what I use to send logs to syslog-ng
|
Beta Was this translation helpful? Give feedback.
This is what I use to send logs to syslog-ng