LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   syslog-ng output (https://www.linuxquestions.org/questions/linux-software-2/syslog-ng-output-467653/)

sidra 07-25-2006 08:46 PM

syslog-ng output
 
Hi,

I'm trying to create a a logging system for some applications using ACE Logging strategies and directing the output from the code to syslog-ng. I'm trying to get syslog-ng to print out the line # from where the message was directed to the log file. By default the output doesn't contain any line # information. Is there an easy way to do this?

Thanks in advance!

acid_kewpie 07-26-2006 04:08 PM

what do you mean by "line #"? you want each new line to have the total number of lines in the file? could you give us more context about your situation?

sidra 07-26-2006 04:33 PM

You know how in the syslog output the text message is displayed from whereever the debug statement was, i need to output the line# in the file from where the message is coming from in the syslog output

sidra 07-26-2006 04:36 PM

For instance this is a call at line 36 in my file called "Use_Syslog.cpp":

MY_INFO( ACE_TEXT ("Testing Macro\n") );

This ouput is directed to syslog-ng's /var/log/messages file. This message is displayed but i also want line 36 as part of the /var/log/messages file entry. I'm able to display the file name but not the line #

Thanks!

acid_kewpie 07-27-2006 01:42 AM

how is syslog-ng supposed to know that information?? sounds like this is actually a C++ question aobut how to get that line number within the code.


All times are GMT -5. The time now is 08:31 PM.