Friday, 1 May 2020

How to handle logging in a repo that's meant to be a package imported another repo?

So I have a private package repo A that I import as a requirement in a typical deployable repo B. Everything works fine, except when I call a function from repo A, it has all of my console.log() commands there. I know I can just remove them all, but I need them for testing (in addition to my tests).I have thought of using a logger, but I'm not sure how I can make it so that:While developing in repo A's project, I can see logsWhile developing in repo B's project, I don't see any logs from package repo AHow do I do this?

Submitted May 01, 2020 at 10:20AM by pizzae

No comments:

Post a Comment