Skip to content

Developed a Shell Script which collects all logs based on user Input Parameters. Logs can be collected in two Modes: TimeStamp or No. of Lines. In TimeStamp all logs will be collected which are touched in‘t’ minute duration. In No. of Lines, ‘n’ number of logs from end will be collected. Input path can be given in two ways: by passing argument o…

License

rishi-anand/logdebugg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

logdebugg

Filters and collects all logs based on user input log path and modes of filter. Greps logs based on:

  • timestamp = logs touched in last t minute
  • no-of-lines = n lines of logs from all specified logs

It accepts below arguments :

-a,     append new logs that are generated by grepping all logs
		to previous log file.

-d,     It takes path of log file(s) from log.properties file which
		is auto generated in present working directory.

-f,     It takes folder(s) as an input, and searches all log files
		within folder and filters all logs based on timestamp or
		no. of. logs.

-fs,    It takes folder(s) as an input, and searches all log files
		within folders and sub-folders and filters all logs based on
		timestamp or no. of. logs.

-h,     It shows help menu.

-n,     It greps logs based on no-of-lines. It expects an integer
		argument. Last n (integer argument) lines of all logs are filtered.
		If any integer is not passed after -n then by default it
		takes 50 lines of logs.

-p,     It takes path of log file(s) from user through terminal
		window. User can pass any number of path(s). Enter path of
		log file(s) just after -p.

-t,     It greps logs based on timestamp. It expects an integer
		argument. Logs touched after t (integer argument)mins are filtered.
		If any integer is not passed after -t then by default it
		takes 5 mins.

-z,     It changes naming convention of new log file. By passing -z as
		an argument, new name of log file becomes log_.yyyy-mm-dd.hh:mm.log.
		This helps users to keep logs of every minute and can later be used for
		comparison.

How to use it ?

  1. git clone https://github.com/rishi-anand/logdebugg.git
  2. cd logdebugg/
  3. ./logdebugg.sh

{ NOTICE : Next version of 'logdebugg' is coming soon with new features. }

Report bugs to 'rishi.anand0@outlook.com'.

About

Developed a Shell Script which collects all logs based on user Input Parameters. Logs can be collected in two Modes: TimeStamp or No. of Lines. In TimeStamp all logs will be collected which are touched in‘t’ minute duration. In No. of Lines, ‘n’ number of logs from end will be collected. Input path can be given in two ways: by passing argument o…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages