https://github.com/cqsupport/greplog
Script for grepping the AEM error log.
https://github.com/cqsupport/greplog
Last synced: about 1 year ago
JSON representation
Script for grepping the AEM error log.
- Host: GitHub
- URL: https://github.com/cqsupport/greplog
- Owner: cqsupport
- License: apache-2.0
- Created: 2016-03-11T22:48:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-02-08T00:01:27.000Z (over 8 years ago)
- Last Synced: 2025-04-04T14:43:54.673Z (over 1 year ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 6
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# greplog
Script for grepping Sling, CQ5.x and AEM6.x error log files. The script outputs the log messages and their stack traces and allows filtering by regex and by date/time range.
```
Usage: php greplog.php -f [options]
-f: log file path
-l: log level: This filters the log messages by log level. Possible values are DEBUG, DEBUG-ONLY, INFO, INFO-ONLY, WARN, WARN-ONLY, ERROR. Default value is ERROR.
-s: search string: Filter log messages by string.
-x: exclude regular expression: Exclude log messages by regular expression. Example value "/Exclude 1|Exclude 2/"
-r: search regular expression: Filter log messages by regular expression. Example value "/Include 1|Include 2/"
-n: show line numbers
-H: show filename
-b: beginning time: This filters log messages by only including messages that come after the time specified. Example value "01.03.2011 15:09:51". The format is dd.mm.yyyy hh.mm.ss
-e: end time: This filters log messages by only including messages that come before the time specified. Example value "01.03.2011 15:09:51". The format is dd.mm.yyyy hh.mm.ss
```
### Example
Search replication.log for all log messages that exclude the terms "reverse" and "publish5"
```
php greplog.php -f replication.log -l info -x "/reverse|publish5/"
```