Erlang (OTP 21+) Logger Console Output Question (Garbled Prompt)

Brett Hemes <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CH2PR03MB5336CCF1BCF5ECB3942D9B02BE579@CH2PR03MB5336.namprd03.prod.outlook.com>
While developing I often use console prints as debugging/verification tools.  In the past I have used io:format for this purpose but I would like to use the new OTP logger to do this and then be able to filter based on severity and/or send them to a file instead of the console as the project matures.  However, I am having trouble currently preventing logger's output from destroying my console interactivity.  I have logger setup to use the console for output but **the logging prints output AT the current cursor position and thus destroy any input-in-progress** making interaction during busy logging near impossible.  In contrast, using io:format performs as desired where the output happens (and scrolls) right ABOVE the cursor line (i.e., without destroying the prompt).  Is this known behavior and/or is there any way to fix it (e.g., with some sys.config settings)?

For example,

With io:format:
    37> some_intput.
    some_info_i_would_like_to_display
    some_more_info
    info_etc
    38> my-next-input.<enter>
    39> <enter>
    39>

With logger:
    37> some_input.
    38> some_info_i_would_like_to_display
    my-nexsome_more_info
    t-input.<enter>

    39> info_etc<enter>

    39>



I would very much like to figure this out.

Thanks,
Brett
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.