LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2016, 07:58 AM   #1
sluge
Member
 
Registered: Dec 2006
Location: Russia,52
Posts: 116

Rep: Reputation: 6
Question rsyslog put all data to the new file


Hello,

In my rsyslog.conf I had:

Code:
$FileOwner user
$FileGroup user
$FileCreateMode 0640
local1.*                                         /opt/log/file1.log

$template LogFile, "/opt/log/log-%msg:R,ERE,1,BLANK:\[]--end:-%.log"
local2.*                                         ?LogFile

$FileOwner user
$FileGroup user
$FileCreateMode 0640
local0.*                                         /opt/log/file0.log

$FileOwner user
$FileGroup user
$FileCreateMode 0640
local3.*                                         /opt/log/file3.log


$FileOwner user
$FileGroup user
$FileCreateMode 0640
local5.*                                         /opt/log/file5.log


$FileOwner user
$FileGroup user
$FileCreateMode 0640
local6.*                                         /opt/log/file6.log

To the bottom I added the following line:

Code:
$FileOwner user
$FileGroup user
$FileCreateMode 0640
local4.*                                         /opt/log/file4.log
So when I restarted the rsyslogd, I got a lot of messages in file4.log, that also located in file3.log.

So why? Is my rsyslog.conf after adding local4.* contains errors?
 
Old 02-02-2016, 12:55 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,354
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Quote:
Originally Posted by sluge View Post
(..)So why? Is my rsyslog.conf after adding local4.* contains errors?
Using LOCAL[0-9] facility implies you set the facility in only one application and so no filter termination line is needed. I'd first determine which applications all use local4.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Rsyslog writing to both my file and messages file ne1scott Linux - General 1 09-11-2015 11:09 PM
Rsyslog file missing Ktarak Linux - Kernel 3 06-13-2015 09:02 PM
rsyslog not logging to a correct file packets Linux - Newbie 2 03-10-2012 08:11 AM
how to put sql data file on sme server distribution olympico Linux - Newbie 2 10-19-2008 12:11 PM
how to write log data to disk when the server is down while using rsyslog prakash.akumalla Linux - Newbie 1 06-25-2008 01:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration