{% macro render_select(name, options, selected, autokey=false) %}
{% endmacro %}
{% import _self as macro %}
{% set file = grav.uri.query('log') ?: 'grav' %}
{% set verbose = grav.uri.query('verbose') == 'true' ? true : false %}
{% set lines = grav.uri.query('lines') ?: 20 %}
{% set logfile = grav.locator.findResource("log://" ~ file ~ '.log') %}
{% set logs = logviewer.objectTail(logfile, lines|int, false) %}
{{ file|titleize }} Log File
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 %}