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

Notices


Reply
  Search this Thread
Old 05-15-2013, 05:12 AM   #1
Amit Kumar Gupta
LQ Newbie
 
Registered: May 2013
Posts: 16

Rep: Reputation: Disabled
Eventlog file


Please let me know how should we can genrate eventlog file for an application?
 
Old 05-15-2013, 05:17 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
I'm not exactly sure what you're asking. If you have the appropriate permissions you can put it in /var/log or else in the user's home folder or anywhere else you like.
jdk
 
Old 05-15-2013, 05:32 AM   #3
Amit Kumar Gupta
LQ Newbie
 
Registered: May 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi jdk,

I dont have to do anything with application. Let say we had already done set-up in application and it is genrating a log file. But i want to generate a seperate eventlog file which takes records of only 'error' or 'warning' messages.

Thanks
 
Old 05-15-2013, 06:06 AM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Can you mention for which application you're askin about? Any particular application?
 
Old 05-15-2013, 06:09 AM   #5
Amit Kumar Gupta
LQ Newbie
 
Registered: May 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
Arya g,
i have write a script which generated a evenlog file for an application. This is my over all task.

And the main problem i am new to Unix. I am trying to get help from this forum.
 
Old 05-15-2013, 06:15 AM   #6
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 592

Rep: Reputation: 140Reputation: 140
You can use incrontab for this.

Last edited by whizje; 05-15-2013 at 06:16 AM.
 
Old 05-15-2013, 07:19 AM   #7
Amit Kumar Gupta
LQ Newbie
 
Registered: May 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
Whizje,

i dont understand. Could you please clarify.

Thanks
 
Old 05-15-2013, 08:24 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
The qn isn't entirely clear, but you basically have 2 options

1. if you have access to the src, you can amend it to do what you want

2. if you don't have src access, you'll need to filter the output and grep the error msgs eg
Code:
tail -f file.log|grep 'error' >error.log
HTH
 
Old 05-15-2013, 10:08 AM   #9
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 592

Rep: Reputation: 140Reputation: 140
With incrontab you can monitor a file for changes and if there is a change run a script like the above to look if there is a error.
 
Old 05-15-2013, 10:46 AM   #10
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,195
Blog Entries: 10

Rep: Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986
There is NO need to install any "program" to monitor your script's error output. Because it won't work.
There is every need that you will have to code it in yourself, please see http://tldp.org/LDP/abs/html/ioredirintro.html for an introduction to "redirection".
 
1 members found this post helpful.
  


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
[SOLVED] Syslog-ng eventlog error during compiling bonedragon Linux - Newbie 4 08-16-2012 05:34 PM
Mencoder adds the extension of the original file to the output file ex: file.flv.mp4 linuxlicious Linux - General 1 04-15-2012 05:07 AM
manage engine eventlog analyzer drsketch1 Linux - Enterprise 3 02-04-2011 04:43 PM
How to play a media file/ video file/mp3 file recorded in harddisk/cd-rom arindam Linux - Newbie 2 09-05-2003 11:31 AM


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