简体   繁体   中英

How to write to different sections of a window using console.log in node.js?

I'm wondering if it's possible to write to different sections/portions of a node.js terminal window when I log output. Kind of like divs with html.

So can I for example split the window to two columns and console.log things in one side, and console.log things to the other side? (without using a library like tmux).

Console.table would have been a good bet, but it is not yet implemented.

Console.printer shows more promise, but is reliant on the implementation method used to do the formatting. If you scroll down to the example, your best option might be to use something like this example to define your own formatter which writes to either stdout or stderr.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM