mikaelbr / node-notifier

A Node.js module for sending notifications on native Mac, Windows and Linux (or Growl as fallback)
MIT License
5.73k stars 322 forks source link

Minor log pollution on Win11 when using actions #448

Open jacoblockett opened 3 weeks ago

jacoblockett commented 3 weeks ago

Is there a way to remove the log to the console that occurs when the user clicks on a toast button?

notifier.notify(
    {
        title: "dlr",
        message: `Done. A log can be found at ${logFilePath}`,
        sound: true,
        actions: ["Open log", "Close"],
    },
    (_, response) => {
        if (response === "open log") {
            open(logFilePath)
        }
    }
)

Regardless of the callback logging the response in my code, this produces one of:

Open log
Close

I tried to dig around the source but didn't see anything immediately obvious. Please let me know if there's an option to mute this that I'm missing or where it's coming from so that I can mute it in source. I looked around in issues but didn't find anyone else mentioning this. Sorry if I missed it!

mikaelbr commented 3 weeks ago

Is this on mac? This might be hidden away in terminal-notifier which is used underneath 🤔

jacoblockett commented 3 weeks ago

This is on Windows 11. The same behavior can be seen in the Windows example gif in the README, I just assumed it was being logged on purpose in the demo.