how can i return the morgan combined format string
async function sample(){
const res = await axios.get("http://localhost:3000/sample")
const morganFormattedString = morgan('combined', {stream: {write: res => res }})
}
the res will be an object , i need to get the object of res to be converted as below string which is done by the morgan internally
::ffff:127.0.0.1 - - [18/Jan/2019:04:59:10 +0000] "GET /sample HTTP/1.1" 200 2 "http://localhost/" "Mozilla/5.0 (linux) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0"