gvalkov / tailon-legacy

Webapp for looking at and searching through log files
http://tailon-legacy.rtfd.org/
Other
191 stars 45 forks source link

Cannot start tailon v1.0 because of a missing 'tail-lines' key #37

Closed asibin closed 8 years ago

asibin commented 8 years ago

Hello, I think i have found a bug in v1.0 of tailon.

When starting app with tailon -c ~/test.yml

This is the test.yml file:


---
bind: 0.0.0.0:8133      # address and port to bind on
allow-transfers: true   # allow log file downloads
relative-root: ''  # web app root path (default: '')
commands: [tail, grep]  # allowed commands
tail-lines: 100

files:
  - '/var/log/authd.log'

I get this output:

Traceback (most recent call last):
  File "/Users/sibin/.virtualenvs/tailon/bin/tailon", line 11, in <module>
    load_entry_point('tailon==1.0.0', 'console_scripts', 'tailon')()
  File "/Users/sibin/.virtualenvs/tailon/lib/python2.7/site-packages/tailon-1.0.0-py2.7.egg/tailon/main.py", line 268, in main
    'tail-lines-initial': config['tail-lines'],
KeyError: 'tail-lines'

Even though tail-lines was defined in config it wasn't read, what is worse it wouldn't start tailon at all because it was failing to get key.

Here is the pull request:

36

Cheers, Sibin

gvalkov commented 8 years ago

Hello @asibin . Thank you for the bug report and the fix!