Remote log tailing
See original GitHub issueImagine
sh gradlew aemTail -Paem.instance.name=int-publish -Paem.tail.name=logs/error.log
or using shorthand syntax:
sh gradlew aemTail -Paem.tail=int-publish:logs/error.log
or even if default specified as:
aem {
config {
tail = propParser.string("aem.tail", "int-author:logs/error.log")
tailMaxErrors = 20
tailMaxWarnings = 30
/*
tailStatus = { status->
if (status.logs.filter { it.contains("error") }.isNotEmpty() {
status.text = "UNSTABLE"
} else
status.text = "STABLE" {
}
def grep = propParser.string("aem.tail.grep")
if (grep != null) {
status.grep(grep)
}
}
}
}
then just
sh gradlew aemTail
will grab logs using url http://x.x.x.x:4503/system/console/slinglog/tailer.txt?_dc=1520834477194&tail=400&name=%2Flogs%2Ferror.log
and output it interactively as aemAwait
does.
it would be nice that status bar will compute some summary like below:
<-------------> 0% EXECUTING [9m 33s]
> :aem:aemTail > local-author [errors: 40, warnings: 120] - UNSTABLE
12.03.2018 06:57:02.117 *INFO* [qtp687303746-206125] org.apache.sling.auth.core.impl.SlingAuthenticator getAnonymousResolver: Anonymous access not allowed by configuration - requesting credentials
12.03.2018 06:57:04.119 *INFO* [qtp687303746-206125] org.apache.sling.auth.core.impl.SlingAuthenticator getAnonymousResolver: Anonymous access not allowed by configuration - requesting credentials
UNSTABLE/STABLE displayed will depend on configured maximum error/warnings per minute rate.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Tailing log files on multiple remote machines | by Madhur
Tailing log files on multiple remote machines. Recently, our ELK infrastructure went down which aggregates log from our multiple servers.
Read more >How can I tail a remote file? - Stack Overflow
You can Tail files remotely using bash and rsync. The following script is taken from this tutorial: Tail files remotely using bash and...
Read more >Tailing files on remote hosts | The Logfile Navigator - Lnav
This feature allows you to view local files and files from multiple remote hosts alongside each other in the log view. The only...
Read more >Laravel Tail can now tail remote logs - Freek.dev
To tail a remote log, you just have to add a couple of lines to your .env file. Here's an example for freek.dev...
Read more >ukhas/js-logtail: Remote log tailing using the HTTP ... - GitHub
Ludicrously simple remote unix 'tail' like log viewer. This uses an ajax request, and the HTTP Range: header to request only the last...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Additional comments:
Next steps:
released as 6.1.0-beta 😃