LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 04: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, 04:17 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

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, 04: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, 05:06 AM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Can you mention for which application you're askin about? Any particular application?
 
Old 05-15-2013, 05: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, 05:15 AM   #6
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

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

Last edited by whizje; 05-15-2013 at 05:16 AM.
 
Old 05-15-2013, 06: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, 07:24 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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, 09:08 AM   #9
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

Rep: Reputation: 141Reputation: 141
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, 09:46 AM   #10
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
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



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 04: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 04:07 AM
manage engine eventlog analyzer drsketch1 Linux - Enterprise 3 02-04-2011 03:43 PM
How to play a media file/ video file/mp3 file recorded in harddisk/cd-rom arindam Linux - Newbie 2 09-05-2003 10:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:56 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
Open Source Consulting | Domain Registration