Add support for the `format` option to control the output format of the log entry. Possible values are `json` (default) and `csv`.