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

**URL:** https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979
**Category:** General
**Created:** [9 May 2026 16:13 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979 "2026-05-09T16:13:41Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![knowledgeshark](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knowledgeshark/32/4820_2.png) [@knowledgeshark](https://discourse.nodered.org/u/knowledgeshark)
#### Post date: [9 May 2026 16:13 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979/1 "2026-05-09T16:13:41Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [9 May 2026 16:20 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979/2 "2026-05-09T16:20:39Z")

</div>

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

The standard log looks like this

```auto
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| `

---

<div class="post-metadata">

### Author: ![knowledgeshark](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knowledgeshark/32/4820_2.png) [@knowledgeshark](https://discourse.nodered.org/u/knowledgeshark)
#### Post date: [9 May 2026 17:08 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979/3 "2026-05-09T17:08:09Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [9 May 2026 17:27 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979/4 "2026-05-09T17:27:17Z")

</div>

@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?

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [9 May 2026 19:53 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979/5 "2026-05-09T19:53:58Z")

</div>

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

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

```

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

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [9 May 2026 20:10 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979/6 "2026-05-09T20:10:29Z")

</div>

> [@hardillb](#):
>
> 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?

```auto
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 | ===================

```

---

<div class="post-metadata">

### Author: ![knowledgeshark](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knowledgeshark/32/4820_2.png) [@knowledgeshark](https://discourse.nodered.org/u/knowledgeshark)
#### Post date: [9 May 2026 20:12 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979/7 "2026-05-09T20:12:40Z")

</div>

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

---

<div class="post-metadata">

### Author: ![knowledgeshark](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knowledgeshark/32/4820_2.png) [@knowledgeshark](https://discourse.nodered.org/u/knowledgeshark)
#### Post date: [10 May 2026 00:10 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979/8 "2026-05-10T00:10:02Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 May 2026 01:13 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979/9 "2026-05-10T01:13:16Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [24 May 2026 01:13 UTC](https://discourse.nodered.org/t/how-to-remove-preceding-0-node-red-in-log-file/100979/10 "2026-05-24T01:13:35Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
