bithavoc / express-winston

express.js middleware for winstonjs
https://www.npmjs.com/package/express-winston
MIT License
797 stars 187 forks source link

allow msg to accept a function to customize output string #160

Closed brendancwood closed 6 years ago

brendancwood commented 6 years ago

I'm not a fan of the msg being a string that's bound by lodash {{}} templating, so why not allow msg to accept a function so I can manipulate rec/res how I want with js and return a string however I want?

brendancwood commented 6 years ago

also, should I make the error logger do the same thing? I think I may do that here in another commit

brendancwood commented 6 years ago

@bithavoc we're using this lib for logging and this pr would make it so we don't have to use my personal fork of it, let me know if there's any other feedback, would be happy to address anything

bithavoc commented 6 years ago

@brendancwood sure, can you fix the conflicts so I can merge? Thanks.

brendancwood commented 6 years ago

done, let me know if you need anything else thanks!

bithavoc commented 6 years ago

@brendancwood excellent, forgot to mention it, but the Readme should contain some help instructions on how to use this new functionality. can you add it?

brendancwood commented 6 years ago

hopefully what i added to the readme is clear enough

bithavoc commented 6 years ago

Thanks ✌️