mifi / instauto

Instagram bot / automation library written in Javascript for Node.js
808 stars 145 forks source link

Implement DateTime to logs #66

Open joelemanoel opened 3 years ago

joelemanoel commented 3 years ago

I believe this feature of being able to see the log time can help in debugging and other ways.

mifi commented 3 years ago

I believe this can be achieved by the user of the library by providing a custom logger option which also logs the current time

Flamintus commented 2 years ago

Hi, I found a solution that works perfectly :)

$ cd /your/Instaauto/folder $ npm install console-stamp --save Add this line 2 of your exemple.js // add timestamps in front of log messages require('console-stamp')(console, '[HH:MM:ss.l]'); Run your script and enjoy 👍

Based on https://stackoverflow.com/questions/18814221/adding-timestamps-to-all-console-messages