How to Separate Logging and Serial Communication on Different VCOMs (nRF5340)

I am using the board nRF5340 Soc, which by default exports two VCOM ports via the J-Link OB debugger. Currently:

  • VCOM1 (UART0) is used for both logging and serial communication by default.
  • VCOM2 mainly logs boot information.

Goal:

I want to separate logging and serial communication as follows:

  1. VCOM1 (UART0) → Only for logs (debug messages).
  2. VCOM2 (UART1) → Only for serial read/write communication.

Questions:

  1. Is there an internal J-Link OB forwarding mechanism that could be causing this issue?
  2. Are there any Zephyr configurations or Nordic-specific settings required to properly separate logs and serial communication?
  3. What is the best way to ensure logs stay on VCOM1 and serial communication happens only on VCOM2?

Any guidance or recommendations would be greatly appreciated. Thanks!