Regirect /var/log/log/syslog messages to our own txt file
Hi, I am working on a project, where i print my log messages in /var/log/log/syslog like project_my:info::project started project_my:debug::value of a is 1 i want to redirect project_my:info messages in info.txt file and project_my:debug in debug.txt file. Regards Gunjan
On Sat, Sep 19, 2015 at 9:29 PM, Gunjan Mehta <gunjanmehta08@gmail.com> wrote:
Hi,
I am working on a project, where i print my log messages in /var/log/log/syslog like
project_my:info::project started project_my:debug::value of a is 1
i want to redirect project_my:info messages in info.txt file and project_my:debug in debug.txt file.
Hi Gunjan, If I'm not wrong this depends on your syslog daemon. For example using rsyslog, you have an /etc/rsyslog.conf file useful for configuring rsyslog. If you are talking about kernel messages than adding: kern.debug -/your/debug/file.txt kern.info -/your/info/file.txt HTH, Daniel.
participants (2)
-
Daniel Baluta -
Gunjan Mehta