LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-08-2019, 07:45 AM   #1
LBM
Member
 
Registered: Aug 2010
Location: Denmark
Distribution: Debian
Posts: 114

Rep: Reputation: 1
logger tags and syslog-ng


I want to "split" my logs by tags, so an specific tag comes to an seperate logfile. Im trying to create an filter inside syslog-ng, whith an tagging.

The line original looks like this, which just catches all, despite tags or thes like, which is fine.
Code:
log { source(s_sys); filter { facility(local0); };    destination(d_testlog); };
The new one looke, like this
Ref: https://www.syslog-ng.com/technical-...tags-filtering

Code:
log { source(s_sys); filter { facility(local0) and tags("test"); };    destination(d_testlog); flags(final);};
And the logger command like so, but I get nothing in the logfile. Any suggestions ?
(ps I can get it to work fine with rsyslog)

Code:
logger -plocal0.info -ttest teststring

Last edited by LBM; 04-08-2019 at 08:02 AM.
 
Old 04-08-2019, 08:02 AM   #2
LBM
Member
 
Registered: Aug 2010
Location: Denmark
Distribution: Debian
Posts: 114

Original Poster
Rep: Reputation: 1
So, its called program in syslog-ng, and not tags apperently!

So, this is working for me
Quote:
log { source(s_sys); filter { facility(local0) and program("test"); }; destination(d_testlog); flags(final);};
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System logger & Kernel logger service start twice? quanta Fedora 0 12-07-2007 06:09 AM
syslog: using logger (please help test this) psychobyte Linux - Security 1 01-07-2005 06:26 PM
Syslog logger facility problem tuxster SUSE / openSUSE 0 01-02-2005 04:17 PM
Syslog logger facility problem tuxster Linux - General 0 12-25-2004 12:29 PM
system logger fails when restarting syslog tpau Linux - General 1 10-21-2003 08:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration