Search code examples
restloggingsyslogrsyslog

Remote logging: rsyslog vs. RESTful API


I'm working with Django and Loggly, and I need to decide between using Loggly with rsyslog or with its RESTful API. For the second option, I'd use grequests, sending a single request at a time (i.e., just to make the calls non-blocking, but I wouldn't send requests in bulk).

What are the advantages of using rsyslog over the RESTful API and vice versa?


Solution


  • Haven't tested it yet, but using the syslog approach has several advantages:

    • You can centralize logs at a system level, without particular configurations on the django app
    • Logging is decoupled from the django app, you can set it to log to file, a remote syslog server or loggly, without touching the django app
    • It should be faster if using UDP
    • If using a centralized syslog server, you only have to set the loggly agent there

    On the other hand, using the RestAPI would couple the app to the loggly implementation, and it could raise some errors while trying to report errors (DNS resolution failures, network problems, etc)