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

control/log connections don't show history #19

Open
gitwart opened this issue Jan 3, 2018 · 7 comments
Open

control/log connections don't show history #19

gitwart opened this issue Jan 3, 2018 · 7 comments

Comments

@gitwart
Copy link

gitwart commented Jan 3, 2018

When opening up a telnet connection to the log/control ports, it would be very useful if the last n lines of output were echoed to the terminal. This is especially useful for softIOCs that present a menu to the user.

I have a patch that adds rudimentary support for this feature. I'll create a pull request as soon as I figure out how.

@ralphlange
Copy link
Owner

ralphlange commented Jan 4, 2018

I like the idea - that was one of the things missing when moving from the former screen based solution.
I'm a bit snowed in (not literally), but will try to find some time next week to have a look at #20.
Maybe add a configuration option, and do the necessary changes in the doc and CI setups.

Do you want me to push to your PR? (It's your master branch, so I am a bit reluctant.)
Else I would take it meta and issue a PR against your master.

@gitwart
Copy link
Author

gitwart commented Jan 4, 2018

You're welcome to push to the PR. My fork only exists for this PR. I may also be adding a couple of minor changes later today, such as: Add a command line option to set the size of the log buffer, obey the stamplog setting for buffered log messages.

@ralphlange
Copy link
Owner

ralphlange commented Jan 4, 2018

Cool. The first of your items was also on my list... What about using -H/--history=<n> ?
I would be conservative and leave the feature off by default; use 25 for -H without argument.

@gitwart
Copy link
Author

gitwart commented Jan 4, 2018

-H already appears to be used for holdoff:
{"holdoff", required_argument, 0, 'H'},
How about '-b n/--logbuffersize=n'? I would prefer that the argument is required (eg -b 25 is allowed, but '-b' with no value is not)

@ralphlange
Copy link
Owner

Hm. Well... -H was actually never documented and never intended to be used. (There are more of those cases: the long_options structure needs something as a short option.)
I find -H/--history more obvious. Requiring the argument is fine.

@gitwart
Copy link
Author

gitwart commented Jan 4, 2018

Got it. I'll repurpose -H for history, and change the short option for --holdoff to -O.

@ralphlange
Copy link
Owner

Perfect.
Re: "gitwart" - I smile whenever I read it. German background?

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

2 participants