NRF connect serial terminal logs display language mode

How can I display the nrf serial terminal logs files on VS Code while keeping the same colors and text highlights for dbg, inf, wrn, etc., just like when viewing live logs through the terminal?

I tried some of the existent language modes in vscode (CTRL+shift+p => change language mode ), but none of them was like the nrf terminal.

Parents
  • Hello,

    You can use a VS Code extension for this. See the extension Logfile Highlighter. You can use your own configuration and highlighting rules by editing the settings.json file. Something like the following may work for you:

      "logFileHighlighter.customPatterns": [
        {
          "pattern": "dbg",
          "foreground": "#2268aa"
        },
        {
          "pattern": "inf",
          "foreground": "#22aa22"
        },
        {
          "pattern": "wrn",
          "foreground": "#ecb316"
        },
        {
          "pattern": "err",
          "foreground": "#aa2222"
        }
    
      ]

    Kind Regards,

    Abhijith

Reply
  • Hello,

    You can use a VS Code extension for this. See the extension Logfile Highlighter. You can use your own configuration and highlighting rules by editing the settings.json file. Something like the following may work for you:

      "logFileHighlighter.customPatterns": [
        {
          "pattern": "dbg",
          "foreground": "#2268aa"
        },
        {
          "pattern": "inf",
          "foreground": "#22aa22"
        },
        {
          "pattern": "wrn",
          "foreground": "#ecb316"
        },
        {
          "pattern": "err",
          "foreground": "#aa2222"
        }
    
      ]

    Kind Regards,

    Abhijith

Children
Related