Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-13-2007, 08:55 PM   #1
Registered: May 2006
Distribution: Slackware, DragonFly
Posts: 233

Rep: Reputation: 30
tracing application logs in syslog

I 'd like that my daemon write your logs in /var/log/syslog file.
What is the correct way to use openlog, syslog and closelog ?
How can I to trace application logs in syslog ?

PS = I read yet man page!
Old 05-14-2007, 04:01 AM   #2
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
I am not familiar with the details. I am writing because nobody else has replied and this seems like a question that most people should know.

You will need to use the syslog facility. You can read about it in the man utility.
man syslog
You will need to create an entry in the /etc/syslog.conf file to tell the syslog daemon to write calls from your application to syslog into the /var/log/syslog file. The entries that are already in that file provide good examples of how to create a new record.

I think that's generally what you need to do.
Old 05-15-2007, 03:38 AM   #3
Senior Member
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,421

Rep: Reputation: 200Reputation: 200Reputation: 200
there is a command-line utility logger which does the same sort
of thing, you can experiment with that maybe to speed up your


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
tracing the logs from a dialup users nhoelle_18 Linux - Networking 0 06-01-2005 06:15 AM
syslog-ng doen't generating logs emailssent Linux - Newbie 3 03-09-2005 05:44 AM
Guarddog logs in syslog short101 Linux - Security 3 01-06-2005 01:31 AM
Tracing which user logs onto which PC kenji1903 Linux - Networking 13 09-13-2004 10:04 AM
Getting logs from a remote syslog ganninu Linux - Newbie 4 09-10-2003 09:05 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:52 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