DanKaplanSES
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/11/2025 in #back-end
How can I get the string that console.log(obj); would print?
What advantage does it have over
util.format('%o', ...
?25 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/11/2025 in #back-end
How can I get the string that console.log(obj); would print?
yeah I already use that but I don't find it useful unless I set the same settings as
%o
. It's a lot of typing for quick troubleshooting25 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/11/2025 in #back-end
How can I get the string that console.log(obj); would print?
that seems like the most useful for troubleshooting
25 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/11/2025 in #back-end
How can I get the string that console.log(obj); would print?
I dunno... I think I want
%o
even though it's a little different25 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/11/2025 in #back-end
How can I get the string that console.log(obj); would print?
ah right. In that case, I want a little better than
console.log(obj)
25 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/11/2025 in #back-end
How can I get the string that console.log(obj); would print?
ok thanks!
25 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/11/2025 in #back-end
How can I get the string that console.log(obj); would print?
or
%s
or %O
?25 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/11/2025 in #back-end
How can I get the string that console.log(obj); would print?
Is
console.log(obj)
roughly equivalent to util.format('%o', obj)
?25 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/11/2025 in #back-end
How can I get the string that console.log(obj); would print?
But your link seems to be saying it can be done with https://nodejs.org/api/util.html#utilformatformat-args
25 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/11/2025 in #back-end
How can I get the string that console.log(obj); would print?
I think I asked my question in a confusing way and have edited it. Hopefully that is more clear. I'm not trying to get the string from
console.log(obj)
, I'm asking how to create a string with the same value25 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 6/16/2024 in #back-end
Is there a way to pick which build of a dependency to use?
I have but that doesn't help because it still creates issues when my test runs
5 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 6/16/2024 in #back-end
Is there a way to pick which build of a dependency to use?
I'm guessing the answer lies somewhere in the
package.json
, but nothing has really stood out to me when I read the NPM documentation about it5 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/27/2024 in #back-end
How do I publish a public lib locally without adding a `run` script just for me?
I don't see anything in that link suggesting it would make a difference
5 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/27/2024 in #back-end
How do I publish a public lib locally without adding a `run` script just for me?
According to the NPM documentation, this is a good use case for
npm link
or npm install <relativePathToLib>
. Unfortunately, I've run into bugs that make this an impossibility.
Fortunately, there is a library that addresses this bug named yalc.5 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/19/2024 in #back-end
I'm building a library. Is there a logger that can be configured by the user?
With that assumption, does that mean every lib with configurable logging needs to be configured in its own way? And does that mean the user has to learn that way each time they want to configure logging in a new library?
48 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/19/2024 in #back-end
I'm building a library. Is there a logger that can be configured by the user?
That's a semi-rhetorical question: I'm going to assume the latter.
48 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/19/2024 in #back-end
I'm building a library. Is there a logger that can be configured by the user?
okay so when you change the default, is it usually a simple on/off, or can log levels be configured?
48 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/19/2024 in #back-end
I'm building a library. Is there a logger that can be configured by the user?
probably other reasons too
48 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/19/2024 in #back-end
I'm building a library. Is there a logger that can be configured by the user?
Yeah that makes sense because users would see those logs and they may slow down the app
48 replies
KPCKevin Powell - Community
•Created by DanKaplanSES on 1/19/2024 in #back-end
I'm building a library. Is there a logger that can be configured by the user?
I'm back now
48 replies