fullstack-build/tslog

Customizing field names for arguments using `type:json`

Closed this issue · 1 comments

Is it possible? For example, instead of the output being

{
   0: firstArg,
   1: secondArg
}

I'd like to have something like

{
   msg: firstArg,
   custom1: secondArg,
   ...
   customN: NthArg
}

Apologies if this is discussed elsewhere; I've taken a look and didn't see it.

Yes, you can do this with overwrites:

https://tslog.js.org/#/?id=overwriting-default-behavior