Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

tail a log file with python

pip or pip3 install sh

from sh import tail
# runs forever
for line in tail("-f", "/var/log/some_log_file.log", _iter=True):
    print(line)
Source by newbedev.com #
 
PREVIOUS NEXT
Tagged: #tail #log #file #python
ADD COMMENT
Topic
Name
8+6 =