I have created an Application using Hapi.js and i have used good-file to write logs to a file and when ever I use request.log() and server.log() methods, its writing the logs to the file. But my requirement is when ever I use console.log() it should log that into the file. Because i will not have request or server object in all of my files. How can i achieve it?
This is how i configured my reporter
myFileReporter: [{
"module": "good-squeeze",
"name": "Squeeze",
"args": [{
"request": "*",
"error": "*",
"response":"*",
"log":"*"
}]},
{
"module": "good-squeeze",
"name": "SafeJson"
},
{
"module": "good-file",
"args": ["./logs/log"]
}]