Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-25-2008, 05:41 PM   #1
Registered: Mar 2005
Posts: 49

Rep: Reputation: 15
help understanding syslog

I run a game server under a regular user on my box, it also logs everything to the syslog file (which i don't care for becuase i think it is messy and a whole lot of output) insted id like it to go to it's own log file, something like /var/log/game.log. I have been reading over the syslog.conf file and undertand you can separate logs using faculties those being:

auth - authentication (login) messages
cron - messages from the memory-resident scheduler
daemon - messages from resident daemons
kern - kernel messages
lpr - printer messages (used by JetDirect cards)
mail - messages from Sendmail
user - messages from user-initiated processes/apps
local0-local7 - user-defined (see below)
syslog - messages from the syslog process itself

can this be done. cause i feel like it couldnt just log the game output to its own file, but rather all user logs via:

user.* -/var/log/user.log

Last edited by blancs; 09-25-2008 at 06:01 PM.
Old 09-26-2008, 03:03 AM   #2
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Rep: Reputation: 40
It seems like the application itself must define which faculties to use, so if the gameing app uses USER then you must redirect all user logs to a file (as you suggested).

But I'm may be wrong, so get someone else's opinion also.
Old 09-26-2008, 03:23 AM   #3
Mr. C.
Senior Member
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 62
Run strace on the application, and watch for calls to openlog and syslog. The third argument to openlog() will be the FACILITY and the first argument to syslog() will be the PRIORITY. These determine how syslog handles the log messages. Typically, general applications use the LOCAL0 - LOCAL7 FACILITYs.

strace gameserver

There will be a lot of output, so you can redirect or pipe the output if you want.

Last edited by Mr. C.; 09-26-2008 at 12:24 PM.
Old 09-26-2008, 11:15 AM   #4
Registered: Mar 2005
Posts: 49

Original Poster
Rep: Reputation: 15
great thank you.


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
I need help getting syslog to log remotely, this is just the regular syslog. abefroman Linux - Software 2 06-05-2008 12:36 PM
syslog client to log to syslog-ng and itself noir911 Linux - Server 1 02-08-2008 10:51 AM
LXer: Centralized Syslog Server Using syslog-NG LXer Syndicated Linux News 0 04-28-2006 07:21 PM
help understanding ln dr_zayus69 Linux - General 3 01-14-2005 09:33 PM
Win98se/WinXP- with linux- ELP! Newbej Linux - General 3 09-05-2001 08:57 AM > Forums > Linux Forums > Linux - Newbie

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

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