Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: command line agrument to tail a socket host/port #61

Open
MiMiMeowMeow opened this issue Oct 6, 2024 · 1 comment
Open

Comments

@MiMiMeowMeow
Copy link

Hello,

I have a custom python hander to emit jsonl to a socket. I used toolong to monitor the socket and it works great. I have to pipe it using this command: "nc -lk 9999 | tl". It would be awesome if it had a command line agrument that would accept a socket host/port. This would make this use case workable in Windows easy. I attached the custom hander.

Another feature would be a short cut key to clear the log/session.

Thanks!
jsonl_socket_logging.zip

@MiMiMeowMeow
Copy link
Author

Tired netcat for windows:

ncat -l -p 9999 | tl

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "D:\pypoetry\virtualenvs\aebusspy-huV59KkV-py3.12\Scripts\tl.exe_main
.py", line 7, in
File "D:\pypoetry\virtualenvs\aebusspy-huV59KkV-py3.12\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pypoetry\virtualenvs\aebusspy-huV59KkV-py3.12\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "D:\pypoetry\virtualenvs\aebusspy-huV59KkV-py3.12\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pypoetry\virtualenvs\aebusspy-huV59KkV-py3.12\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pypoetry\virtualenvs\aebusspy-huV59KkV-py3.12\Lib\site-packages\toolong\cli.py", line 55, in run
with open("/dev/tty", "rb", buffering=0) as tty_stdin:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/dev/tty'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant