LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-29-2014, 01:53 PM   #1
kumarjohn
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Rep: Reputation: Disabled
make particular service logs to be written in separate file in syslog.conf


One of the service is writting logs by default in /var/log/messages file. I want that service logs to be written other file.

Logs in /var/log/messages files are being dislpalyed as below.


Quote:
Nov 20 16:18:40 testserver ServiceName:
I tried changing the configuration in /etc/syslog.conf as below


Quote:
cat /etc/syslog.conf

*.info;authpriv.none;cron.none /var/log/messages

ServiceName /var/log/servicename.log
But still the logs are being written in /var/log/messages file only instead of /var/log/servicename.log.

Request to suggest how to get logs in to other file.

Best Wishes, KJ.
 
Old 11-30-2014, 04:31 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Unless you can set the facility in this service configuration and use that in /etc/syslog.conf use filter rules in Rsyslog or Syslog-NG, not regular syslog.
 
Old 11-30-2014, 08:17 PM   #3
kumarjohn
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Hi,

I dont have the option of rsyslog or syslog-NG. Can you please suggest how to set the facility in service configuration and syslog.conf.
 
Old 12-02-2014, 01:24 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by kumarjohn View Post
Can you please suggest how to set the facility in service configuration and syslog.conf.
It may be listed as (commented out?) example in the service configuration file(s) or else referenced in its documentation.

*If you think this answer is too generic then please understand that you've given me nothing to work with (no specific servie name or configuration file or documentation excerpt) and it doesn't appear you have done any research yourself (and that's not a healthy stance for helpdesk personnel or systems admins).
 
  


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
syslog to central server and store logs in separate host directories steve.goldner Linux - Enterprise 11 04-07-2012 02:26 PM
(syslog server) Need a app to pull and make sense of logs kryznic Linux - Software 2 03-15-2010 10:47 AM
Squid logs and syslog.conf porx Linux - Newbie 5 08-11-2008 08:58 AM
Im running syslogd. I also have my PIX firewall logs being written to my linux syslog adamrau Linux - Security 2 12-19-2001 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:05 PM.

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