What's the best way to log a dynamic variable?
Example: while running the app, my log changes size and data. I want the log to not change, and simply save data.
This is my code for creating the log file:
const output = fs.createWriteStream('./stdout.log');
const errorOutput = fs.createWriteStream('./stderr.log');
const logger = new Console(output, errorOutput);
logger.log(res);
The var res
changes during the execution of the app.