akamai / uls

Unified Log Streamer (ULS)
Apache License 2.0
30 stars 10 forks source link

[BUG] #35

Closed bitonio closed 1 year ago

bitonio commented 1 year ago

Bumped into this issue:

hello@localhost:~/uls# python3 bin/uls.py --input etp --feed dns \ \
--output file \
--filename /var/dns_event.json \
--filehandler time --filetime h --fileinterval 1 \
--filebackupcount 168
2022-11-11 17:30:39,705 ULS W UlsOutput issue: 'int' object has no attribute 'lower'
2022-11-11 17:30:39,707 ULS E UlsOutput error connecting to None:None [1]
2022-11-11 17:30:40,709 ULS W UlsOutput issue: 'int' object has no attribute 'lower'
2022-11-11 17:30:40,709 ULS E UlsOutput error connecting to None:None [2]
2022-11-11 17:30:41,710 ULS W UlsOutput issue: 'int' object has no attribute 'lower'
2022-11-11 17:30:41,711 ULS E UlsOutput error connecting to None:None [3]
2022-11-11 17:30:42,712 ULS W UlsOutput issue: 'int' object has no attribute 'lower'
2022-11-11 17:30:42,713 ULS E UlsOutput error connecting to None:None [4]
^CTraceback (most recent call last):
  File "/root/uls/bin/modules/UlsOutput.py", line 305, in connect
    if  self.fileinterval.lower() == "midnight":
AttributeError: 'int' object has no attribute 'lower'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/uls/bin/uls.py", line 234, in <module>
    main()
  File "/root/uls/bin/uls.py", line 156, in main
    my_output.connect()
  File "/root/uls/bin/modules/UlsOutput.py", line 365, in connect
    time.sleep(uls_config.output_reconnect_delay)
KeyboardInterrupt

I think the self.fileinterval.lower() == "midnight": should actually be self.filetime.lower() == "midnight":

MikeSchiessl commented 1 year ago

Hey @bitonio,

good catch !!! I've verified the bug and also verified your proposed fix. It'll be fixed in the next version of ULS ;)

Thanks for report + thanks for including the proposed fix ;)

MikeSchiessl commented 1 year ago

Hi @bitonio,

i jut wanted to let you know that the bug you've spotted has been resolved in ULS v1.6.3

Best regards Mike