Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Can't turn off debug logging #34

Closed
bmcallis opened this issue Sep 4, 2017 · 2 comments
Closed

Can't turn off debug logging #34

bmcallis opened this issue Sep 4, 2017 · 2 comments

Comments

@bmcallis
Copy link

bmcallis commented Sep 4, 2017

Debug logging is always on for bots, regardless of the debug flag.

It appears that this is the problem code

    self.out.debug = function() {
        if (!this.debug) return;
        util.log.apply(util, arguments);
    };

this.debug is that function, so it's never falsey which means that the log always happens. I believe that checking self.opt.debug instead will achieve the desired results, but I'm not sure if that's the "right" fix.

@Throne3d
Copy link
Owner

Throne3d commented Sep 4, 2017

Oh, huh. I thought I did a test for this somewhere to make sure it didn't randomly debug, but presumably I haven't – oops.

I seem to have a name clash, between the function debug and the debug boolean I set in the initialization: https://github.com/Throne3d/node-irc/blob/master/lib/irc.js#L102. It should be a relatively quick fix, and I'll try to get to it soon. Thanks!

@Throne3d
Copy link
Owner

Throne3d commented Sep 4, 2017

Should be fixed in 3eff8bf.

@Throne3d Throne3d closed this as completed Sep 5, 2017
@Throne3d Throne3d mentioned this issue Sep 5, 2017
24 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants