Haproxy Configuration Log Display

Source: Internet
Author: User
Tags system log haproxy rsyslog

After installing Haproxy, the log is logged by default in the System log. In order to make it easier to debug and view the logs, we need to peel off the haproxy logs.

Before configuring, let's first understand the level:local0~local7 of the log 16~23 reserved for local use

1234567 Debug information

To edit the/etc/rsyslog.conf configuration file:

# provides UDP syslog reception # The following comment must be opened, otherwise haproxy cannot write to the log  514#save haproxy log to/var/log/haproxy.log# the level 3 here is consistent with the levels defined in the Haproxy configuration file local3.*                                                /var/log/haproxy.log

To edit the haproxy.cfg configuration file:

Global Log 127.0.0.1 local3# The logging level here is consistent with Rsyslog          

When you're done editing, restart the service.

# /etc/init.d/rsyslog Restart # /etc/init.d/haproxy Restart

Haproxy Configuration Log Display

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.