{% macro render_select(name, options, selected, autokey=false) %}
{% endmacro %}
{% import _self as macro %}
{% set file = grav.uri.query('log') ?: 'grav.log' %}
{% set verbose = grav.uri.query('verbose') == 'true' ? true : false %}
{% set lines = grav.uri.query('lines') ?: 20 %}
{% set logfile = grav.locator.findResource("log://" ~ file) %}
{% set logs = logfile ? logviewer.objectTail(logfile, lines|int, false) : [] %}
{% set log_files = admin.getLogFiles() %}
{% set title = log_files[file] %}
{{ title }} Output
Display the {{ lines }} most recent entries...
Date |
Level |
Message |
{% for log in logs %}
{{ log.date|date }} |
{{ log.level }} |
{{ log.message }} |
{% if verbose %}
|
{% for tracerow in log.trace %}
{{ tracerow }}
{% endfor %}
|
{% endif %}
{% endfor %}