How to remove preceding 0|node-red in log file

I've searched in the settings.js and cannot find how to remove the preceding words before every log line (up to the date in example here).

0|node-red | 9 May 16:04:34 - [info] [debug:Debug22]

Any ideas?
thanks.

You don't, at least from a Node-RED point of view

The standard log looks like this

9 May 16:18:31 - [info] [debug:debug 1] 1778343511369

I suspect from your previous posts that this is being added by pm2, and this is the 0'th node-red instance, e.g. if you told pm2 to run 2 copies of node-red it would be prefixed with 1|node-red|

It didn't used to be that way.

I print out JSON a lot, and cannot cut-paste into my JSON editor.

Maybe node-red can add that back as an option. For me, this is a waste of screen real-estate.

thanks.

@knowledgeshark nothing has changed in the core node-red logging code for years. I recall you saying you updated recently. Do you know what version you updated from?

As Ben says, the 0|node-red | prefix is not coming from Node-RED - so is out of our control.

How are you running Node-RED?

I have test installs all the way back to version 1.3.5 and the basic log layout hasn't changed since then when running bare Node-RED

9 May 20:51:33 - [info] [debug:7129a5f3.4b18c4] 1778356293286

It is very possible that how pm2 displays the log output has changed

I don't believe that is the case. I've been using PM2 for a long time with Node-RED though I've just stopped because of another issue that is stopping the auto-restart from working correctly.

The PM2 base log view hasn't changed in a very long time. Maybe your config has though, somehow?

PM2        | 2026-05-09T21:09:38: PM2 log: SIGTERM timeout      : 1600
PM2        | 2026-05-09T21:09:38: PM2 log: Runtime Binary       : C:\Program Files\nodejs\node.exe
PM2        | 2026-05-09T21:09:38: PM2 log: ===============================================================================
PM2        | 2026-05-09T21:09:38: PM2 log: [Watch] Start watching Node-RED
PM2        | 2026-05-09T21:09:38: PM2 log: App [Node-RED:0] starting in -fork mode-
PM2        | 2026-05-09T21:09:38: PM2 log: App [Node-RED:0] online

D:\src\nr\logout.log last 15 lines:
0|Node-RED |     V8 Total Heap Size: 4269.60 MB
0|Node-RED |     Initial Memory Use (MB): RSS=81.62. Heap: Used=18.32, Tot=32.96. Ext C++=2.57
0|Node-RED |   Node-RED runtime location:  D:\src\nr\node_modules\node-red
0|Node-RED |   Node.js location:  C:\Program Files\nodejs\node.exe
0|Node-RED |   Node-RED current working directory:  D:\src\nr
0|Node-RED |
0|Node-RED | 9 May 21:09:39 - [info]
0|Node-RED |
0|Node-RED | Welcome to Node-RED
0|Node-RED | ===================

That's what I was thinking .. that pm2 tacks that on. I haven't used pm2 until now.

I'm batting 0-3 so far:-)

  1. var flow -- a keyword now
  2. AWS node-red lost connection
  3. pm2 showing logs header.

At least everything works besides that.

thanks

I migrated from:

10 May 00:08:35 - [info] Node-RED version: v2.0.5
10 May 00:08:35 - [info] Node.js version: v14.17.5
10 May 00:08:35 - [info] Linux 4.9.119-44.140.amzn1.x86_64 x64 LE

I had a running system that I was too timid to keep fully up to date.

I also found the raw node-red-out.log (hidden in pm2) and that looks like the normal logs (without 0|node-red)

It is always easier to keep things more up-to-date since small upgrades will pretty much always be easier to manage and deal with.

Node-RED is remarkably stable and rarely gives issues on upgrades.