LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-13-2007, 09:55 PM   #1
shifter
Member
 
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, 05:01 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
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.
Code:
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, 04:38 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,312

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


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


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