{% extends "layout.html" %}

{% block header %}
    <script type="text/javascript" charset="utf-8">
      $(document).ready(function(){
          var socket = io.connect('http://' + document.domain + ':' + location.port + '/');
          var start_time;
          window.setInterval(function() {
              start_time = (new Date).getTime();
              socket.emit('logs');
          }, 1999);
          socket.on('logs', function(msg) {
            $('#log-data').text(msg.data);
          });
      });
    </script>
{% endblock %}
{% block content %}
  <h2>Logs</h2>
  <textarea id="log-data" readonly style="width: 100%; height: 30em; margin-left: 10px;">
  </textarea>
{% endblock %}
