Openlog and syslog in red-hat Linux doesn't write any thing to /var/log/*


 
Thread Tools Search this Thread
Top Forums Programming Openlog and syslog in red-hat Linux doesn't write any thing to /var/log/*
# 1  
Old 07-05-2015
Openlog and syslog in red-hat Linux doesn't write any thing to /var/log/*

Using redhat 64 bit ver 6.2
I have simple c++ app that is trying to write to syslog like this:
Code:
        /*
         try to write massage into linux log
       */
        void foo::writeToSyslog()
        {
            openlog("testlogfoo", 0, 24);  
              // Send the message.
            syslog(LOG_DEBUG, "this is test123");
        }

That's it , but when I grep for testlogfoo or this is test123 in /var/log, it dosn't find anything.

What am I doing wrong here?

Last edited by rbatte1; 07-08-2015 at 02:02 PM.. Reason: Neatened formatting
# 2  
Old 07-05-2015
Quote:
Originally Posted by umen
That's it , but when I grep for testlogfoo or this is test123 in /var/log, it dosn't find anything.

What am I doing wrong here?
Just to make sure: have you put a respective rule in syslogd.conf so that youe message gets indeed written to a file?

I hope this helps.

bakunin

Last edited by rbatte1; 07-08-2015 at 02:03 PM.. Reason: Edited quote to match neater format I set in original post
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Patches for Red Hat Linux

i am installing an application and i am getting this error message about patches Would you like to see system information? Operating System Information Name: Linux Architecture: i386 Version: 2.6.32-431.el6.x86_64 Required OS Patch Levels Passed Name ... (4 Replies)
Discussion started by: DOkuwa
4 Replies

2. Fedora

Which is the better platform to learn UNIX/Linux (Kali Linux Vs. Red Hat or other)?

I just started a new semester and I started my UNIX class yesterday. I've already decided to use python along with my learning process but what I really want to use with it is Kali as my UNIX/Linux platform to learn off of since I already wanted to learn Cyber Sec. anyways. I just wanted to know if... (12 Replies)
Discussion started by: ApacheOmega
12 Replies

3. UNIX for Dummies Questions & Answers

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ?

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ? (2 Replies)
Discussion started by: ahmedamer12
2 Replies

4. Red Hat

Red Hat Linux document

Hi Friends, I am working in new platform I need the document for Red hat Linux. Anybody have pls share with me. Regards, Thangadurai M (2 Replies)
Discussion started by: thangadurai
2 Replies

5. Gentoo

Installing Red Hat Linux

I intend to dual boot linux & Windows XP . I've already installed windows. Its impossible to install Red Hat Linux in graphical mode the screen just goes blank shortly after booting with the linux cd I succesfully installed in text mode. After booting the system I select Linux but the screen... (3 Replies)
Discussion started by: Msororaji
3 Replies

6. Linux

Red Hat Linux 9

Hello there! Will anybody please tell me some good links to online eBooks on Red Hat Linux 9 user experiences and the like. If the books are in PDF Format, it will be nice to read. Thanks for cooperation in advance. Enjoy using open source and breathe freely! JAM (5 Replies)
Discussion started by: Jawwad
5 Replies

7. UNIX for Dummies Questions & Answers

XP to Linux (Red Hat)

I have a PC running XP, and I have a PC that dual boots W2K and Red Hat Linux 7.3. I have the two connected via crossover cable, and the two can access each other when both are running windows. If I were to boot up Linux, can my XP PC telnet to the Linux PC? Any pointers or websites to... (3 Replies)
Discussion started by: lawadm1
3 Replies

8. UNIX for Dummies Questions & Answers

Slackware's Linux 3.0 VS Red Hat Linux 7.x

Hello guys, I got overzealous (I Think). I got the book Linux Unleashed that comes with the Slackware 3.0 Version of Linux for $2.00.I also have Red Hat Linux 7.2 (No book, just the OS).What I wanted to know was,other than the bells and whistles of Red Hat is there any significant difference... (2 Replies)
Discussion started by: perrylx
2 Replies

9. UNIX for Dummies Questions & Answers

Does Motif come with Linux Red Hat 7.2??

I want to know because am very interested in learning the basics or even the whole thing if it isn't too complicated. if it doesn't come with linux red hat, then, where can I get rich information about it?? (1 Reply)
Discussion started by: TRUEST
1 Replies

10. UNIX for Dummies Questions & Answers

Red Hat Linux 6.0

Ok here is my problem i do not know the command to load a driver for my network card in Ted hat linux 6.0 could sombody give me a hand. and if there is anyone that has a list of commands for red hat that would be great also (2 Replies)
Discussion started by: bbutler3295
2 Replies
Login or Register to Ask a Question