Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
Express.js debugging info missing timing

I have an application running inside a docker container, using express.js 4.17.1.

I am trying to debug some performance issues and have enabled the Express debugging using the DEBUG=express:* env setting, this is working and giving me output as below:

Fri, 20 May 2022 13:24:09 GMT express:router use '/sitemap.txt' router
Fri, 20 May 2022 13:24:09 GMT express:router:layer new '/sitemap.txt'
Fri, 20 May 2022 13:24:09 GMT express:router use '/health' <anonymous>
...
Fri, 20 May 2022 13:24:09 GMT express:router use '/' <anonymous>
Fri, 20 May 2022 13:24:09 GMT express:router:layer new '/'
Fri, 20 May 2022 13:24:09 GMT express:application set "port" to 3000
...
Fri, 20 May 2022 13:25:17 GMT express:router dispatching GET /
Fri, 20 May 2022 13:25:17 GMT express:router query  : /
Fri, 20 May 2022 13:25:17 GMT express:router expressInit  : /
Fri, 20 May 2022 13:25:17 GMT express:router <anonymous>  : /
Fri, 20 May 2022 13:25:17 GMT express:router corsMiddleware  : /
...
Fri, 20 May 2022 13:25:17 GMT express:router router  : /
Fri, 20 May 2022 13:25:17 GMT express:router dispatching GET /
Fri, 20 May 2022 13:25:19 GMT express:view require "pug"
Fri, 20 May 2022 13:25:19 GMT express:view lookup "user/views/index.pug"
Fri, 20 May 2022 13:25:19 GMT express:view stat "/usr/app/pug/user/views/index.pug"
Fri, 20 May 2022 13:25:19 GMT express:view render "/usr/app/pug/user/views/index.pug"

However in all the examples, the output includes the critical timing information:

  express:router:route new / +0ms
  express:router:layer new / +1ms
  express:router:route get / +1ms
  express:router:layer new / +0ms
  express:router:route new / +1ms
  express:router:layer new / +0ms
  express:router:route get / +0ms
  express:router:layer new / +0ms
  express:application compile etag weak +1ms

How can I enable this timing information on the debug output?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This appears to be related to the different behaviour of the debug module in TTY vs non-TTY environments.

In a Docker container, colours are disabled by default, and with that the timing information appears to be omitted.

Try running the container with the additional env var DEBUG_COLORS=1.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!