Closed Hannessa closed 8 years ago
You're so close! The second argument to addTarget must be an object. What you want is:
log.addTarget('file', {
file: path.join(__dirname, 'logs', 'errors.log'))
});
Wow, how could I miss that! So embarrassing. Thanks a lot for answering :) Love your library! It's got the perfect mix of features and simplicity.
Hi,
Getting an error when trying to save to a file. Logging to console works, but I get an error after I add the following line to app.js (I'm using Express v4.13.4 and Node.js v5.10.1):
When I try to log something, I get this error in the console:
The folder exists, and I tried changing the path to a string, but still getting the error. Could I be missing something else?