Closed ghost closed 5 years ago
can you please post your error stack? and also post your package.json if you wouldn't mind? What version of smashgg.js are you running?
TypeError: smashgg.setLogLevel is not a function
[0] at Object.<anonymous> (D:\nodep\smash\server\core\scraper.js:22:9)
[0] at Module._compile (internal/modules/cjs/loader.js:688:30)
[0] at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
[0] at Module.load (internal/modules/cjs/loader.js:598:32)
[0] at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
[0] at Function.Module._load (internal/modules/cjs/loader.js:529:3)
[0] at Module.require (internal/modules/cjs/loader.js:636:17)
[0] at require (internal/modules/cjs/helpers.js:20:18)
[0] at Object.<anonymous> (D:\nodep\smash\server\core\dbManage.js:1:79)
[0] at Module._compile (internal/modules/cjs/loader.js:688:30)
[0] at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
[0] at Module.load (internal/modules/cjs/loader.js:598:32)
[0] at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
[0] at Function.Module._load (internal/modules/cjs/loader.js:529:3)
[0] at Module.require (internal/modules/cjs/loader.js:636:17)
[0] at require (internal/modules/cjs/helpers.js:20:18)
[0] at Object.<anonymous> (D:\nodep\smash\server\server.js:3:18)
[0] at Module._compile (internal/modules/cjs/loader.js:688:30)
[0] at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
[0] at Module.load (internal/modules/cjs/loader.js:598:32)
[0] at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
[0] at Function.Module._load (internal/modules/cjs/loader.js:529:3)
[0] at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
[0] at startup (internal/bootstrap/node.js:285:19)
[0] at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
What version of smashgg.js are you using? This functionality was introduced in 3.2+ so if you have anything before that you'll get the undefined error.
I updated the dependencies and it works now, thanks alot. How can i disable the logger completely though?
yeah, I didn't really program that in, but I can hotpatch it tonight. For now you can just set the logLevel to 'error'
and it will only pop up if an error happens in smashgg.js
I will take some time to hotpatch in disableLogger
soon
@L3mmAa issue #35 adds access to disable the logger
I want to disable the winston logger but cant seem to access it in the way it is explained in the docs. Seems like:
doesnt work, it keeps throwing undfinded error for setLogLevel().