Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Output When DEBUG Loaded From .env file #979

Open
slimandslam opened this issue Nov 22, 2024 · 0 comments
Open

No Output When DEBUG Loaded From .env file #979

slimandslam opened this issue Nov 22, 2024 · 0 comments

Comments

@slimandslam
Copy link

slimandslam commented Nov 22, 2024

I'm sure I've done something painfully stupid here, but......

nodejs v20 script:

import dotenv from "dotenv"; 
dotenv.config();
import debug from 'debug';
const logit = debug("myclient:trd");
console.log("DEBUG LIB:", debug.enabled("myclient:trd")); 
console.log("DEBUG ENV:", process.env.DEBUG);
logit("This is a test debug message.");

output:

DEBUG LIB: false
DEBUG ENV: myclient:trd

It seems like debugging should be turned on, but it isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant