Open mischlrebl opened 3 weeks ago
The closest built-in command in NppExec is con_load
, though it loads an entire file into the Console window.
To achieve your goal, you may probably run some external log viewer/watcher implemented as a console application
in NppExec's Console.
The following is related:
https://stackoverflow.com/questions/187587/a-windows-equivalent-of-the-unix-tail-command
My favorite sfk (Swiss File Knife) seems to do the job as well:
sfk tail -f log.txt
thanks a lot for the answer and especially your efforts for the investigation.
while it works on the command line: `C:\Users\Asus2022A\Desktop>sfk200.exe tail -f C:\Users\Asus2022A\Desktop\div\py\logs\stdout.log
2024-11-11 16:23:00.865 | INFO | icon.py | start, streamlit: 1.38.0`
it does not in NppExec: ` ================ READY ================
sfk200.exe tail -f C:\Users\Asus2022A\Desktop\div\py\logs\stdout.log
sfk200.exe tail -f C:\Users\Asus2022A\Desktop\div\py\logs\stdout.log
Process started (PID=36352) >>>`
sfk200 basic
and others work
Any ideas?
You are correct, it doesn't work in NppExec's Console. I did not check that. The reason of why it does not work is described here, Q1: https://d0vgan.github.io/nppexec/?q=FAQ To sum up, in such situations you need to run a program in its own console window.
This version of tail
seems to work in NppExec's Console:
https://github.com/JavaScriptDude/cygtail
On that page, click the "<>Code" button and then click "Download ZIP" there.
tail -f log.txt
thanks a lot for your efforts, works like a charm!
together with the highlighting it is a full log viewer now
If it's not a secret, what highlighting are you using? I'm considering to describe this use-case in the NppExec Manual.
it is no rocket science... would be for sure an interesting and real use case.
Wow, seeing this, it's really inspiring! The truth is, I never thought about NppExec in terms of log viewing - but you actually transformed it into a real log viewer!
Added to the Manual: https://d0vgan.github.io/nppexec/?q=4.6.18
thank you for the documentation which allows everyone to set it up easily by its own.
the wonderful tool makes it possible to implement it by no time. it has been an obvious use case in terms of npp using as an ide where all necessary parts are integrated into one application.
a small hint to the highligthing: as the execution of masks is proceeded from top to bottom the presedence has to be considered. the success line in the log would also match with the lib.py case - which seems not to be applicated as there was already a match before
hello
I am wondering if it is possible to watch and track a log file in the console - like the Monitoring (tail -f) function in npp?
would be very handy to work with split screen on the files and to see the messages below.
thanks in advance