Setting loglevel in environment variable in node

I saw a few weeks back a function/module in nodejs where you could set an environment variable to decide the loglevel and filtering, and then use a function in your program that would only print out info IF loglevel matched.

I am going insane, I cannot find what it was. But I do remember that was an existing module,that -- possibly -- came with Express.

I have been looking for 2 hours. Do you happen to know what it was?

It could be the debug module, as it has exactly that functionality. It doesn't come with Express though. There is logger middleware that came with Express (3) but has since been extracted into its own module and is now called morgan.