breuerfelix / jinsta

javascript + instagram + algorithms
MIT License
60 stars 13 forks source link

Improve logging #13

Closed danniefraim closed 4 years ago

danniefraim commented 4 years ago

I want to improve logging in the following ways:

First of all, I want to introduce a Winston to have a customizeable and better logging framework. I want to by default have less verbose logging to the console so you can follow what the bot does, and more verbose logging to a file to debug issues. In a second step, I want to add code so you can configure the logging, but I won't prioritize that from the start.

I also want to expand on the logging inside the bot, so it's easier to follow what the bot is doing. What kind of feed is it currently following, how much is left of it, whose feed is it, and so on.

I'll make these changes and submit a PR.

breuerfelix commented 4 years ago

really cool ! guess this is really important :)

you could also just use -v command (in the config.ts add a property called verbose: boolean) and depending on that boolean verbose logging is enabled :)

btw about the log file, right now the user has to pass a session.json path to the program, we could change that, so the user has to pass a 'data' dir, and in that dir we could save the session and the log file :)