# Function buildDestinationJsonPrettyStream

Creates a `LogLevelStreamEntry` stream that writes the raw log data with prettified log line, as either a JSON string or object, to a `NodeJs.WriteableStream` or Sonic Boom `DestinationStream` at or above the minimum `level`

Use this to get raw log data + formatted line rendered by pino-pretty. The prettified line is set to the `line` key in the object.

WARNING: This is not a fast operation. The log data must be parsed to json before being prettified, which also parses data to json. If you only need raw log data you should pass a plain Passthrough or Transform stream as an additional destination and then JSON.parse() on 'data' event manually.

If used with `object: true` then

- the `destination` cannot be a file or SonicBoom object
- the `destination` stream passed MUST be set to `objectMode: true`

#### See

DestinationStream

- buildDestinationJsonPrettyStream(level, options): LogLevelStreamEntry

- #### Parameters

  - level:
    | "silent"
    | "fatal"
    | "error"
    | "warn"
    | "info"
    | "log"
    | "verbose"
    | "debug"
    | "trace"
  - options: JsonPrettyDestination

  #### Returns LogLevelStreamEntry

  - Defined in src/destinations.ts:133