Show Log
Last modified by Ricardo Rodríguez on 2026/08/05 17:14
| Shows the xwiki log file content using Groovy |
| Type | Snippet |
| Category | |
| Developed by | |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
Table of contents
Description
{{groovy}}
if (request.lines) {
lines = request.lines;
} else {
lines = 3000;
}
if (request.xpage == "plain" && request.showlog == "1") {
print "{{code language='none'}}"
line = "tail -n " + lines + " catalina.out"
print(line.execute().getText())
print "{{/code}}"
}
{{/groovy}}
[[ShowLog>>?xpage=plain&showlog=1]]