hapijs/hapi-pino

Convert log

Closed this issue · 1 comments

Hi,
I'm using hapi-pino for logging but I don't know how I can map the field contain IP with location to new field (or overwrite IP field).
In other words, I want to customize log and maybe use middleware (for mapping IP to locaiton) on process,

Current

{
   "ip": "123.123.123.123"
}

What I want

{
   "ip": "123.123.123.123",  // May be removed
   "location": "USA"
}

Thanks