You can customize the macOS Console's log window to change the way it behaves. Here's how to adjust it for your needs. macOS's Console app is a utility that allows you to view system-wide logs, crash ...
Any windows application can have a console including gui apps. Look up AllocConsole, GetStdHandle, and WriteConsole (in msdn). You won't need AllocConsole if your starting from one though.