{% extends 'base.html' %}
{% block header %}
    {% block title %}<h1>Token Log</h1>{% endblock %}
{% endblock %}

{% block content %}
    <table class="table">
<thead>
<td>Timestamp</td>
<td>Level</td>
<td>Message</td>
</thead>
<tbody>
{% for line in log %}
    {% if line[2] == 'INFO' %}
        <tr style="background-color: lightgreen">
    {% elif line[2] == 'WARNING'%}
        <tr style="background-color: orange">
    {% elif line[2] == 'ERROR' %}
        <tr style="background-color: red">
    {% elif line[2] == 'DEBUG'%}
        <tr style="background-color: lightblue">
    {% else %}
        <tr>
    {% endif %}
    <td>{{ line[0] }}</td>
    <td>{{ line[2] }}</td>
    <td>{{ line[3] }}</td>
    </tr>
{% endfor %}
</tbody>
</table>
{% endblock %}