shell - Java Console Pushes Input Text When Logging Occurs -
through mobaxterm's ssh feature, i'm running java application on remote linux server. problem arises when attempt type terminal (to process user input requests via scanner) , logging occurs. text i'm typing automatically pushed logging section when print statements happen.
clarifying example:
i manually type "my_input_to_set_some_variable 50" console (and never press enter).
some logging on server occurs , automatically "sends" manually typed "my_input_to_set_some_variable 50" display area.
(above, can see 50 appended 09:08 when never pressed enter).
the desired behavior allow power user type text in terminal's text area (or somewhere reasonable) until enter key pressed. text in terminal's text area should not automatically pushed upon logged or printed statements. looked in terminal settings , wasn't able find modify behavior.
as others mentioned in comment section there not can behaviour.
however don't want logging on tty you're working with.
if have root rights on system connect try suppress log messages on console , redirect them logfile unless there reason not so. since depends sending messages method differs.
another possibility start screen session in terminal open new tty. ease of use connect directly screen session:
ssh -t user@server /usr/bin/screen if create .screenrc file in home directory of user connect to, put
startup_message off in if don't screen start message. can start console app it, screen session ends when stop app.
ssh -t user@server /usr/bin/screen your_start_command_here screen has more features naming session, reattaching session etc. see manual further details.
(the screen solution apparently works if log messages on screen not produced application. in case configure logger not log stdout)


Comments
Post a Comment