Where does linux store my syslog?

后端 未结 7 1485
暗喜
暗喜 2020-12-22 23:47

I wrote a simple test application to log something in a log file. I am using linux mint and after the application executes I try to view the log using this command: <

7条回答
  •  失恋的感觉
    2020-12-23 00:09

    Default log location (rhel) are

    General messages:

    /var/log/messages
    

    Authentication messages:

    /var/log/secure
    

    Mail events:

    /var/log/maillog
    

    Check your /etc/syslog.conf or /etc/syslog-ng.conf (it depends on which of syslog facility you have installed)

    Example:

    $ cat /etc/syslog.conf
    # Log anything (except mail) of level info or higher.
    # Don't log private authentication messages!
    *.info;mail.none;authpriv.none         /var/log/messages
    
    # The authpriv file has restricted access.
    authpriv.*                             /var/log/secure
    
    # Log all the mail messages in one place.
    mail.*                                 /var/log/maillog
    
    #For a start, use this simplified approach.
    *.*                                     /var/log/messages
    

提交回复
热议问题