Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pinojs/pino-pretty
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f8abc54be0406fab006a170049ee7df39c4bf01f
Choose a base ref
...
head repository: pinojs/pino-pretty
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: de1007f1b4f6aa280a07065725f81ca54c14f4ee
Choose a head ref

Commits on Aug 20, 2021

  1. Copy the full SHA
    18c1126 View commit details
  2. Bumped v6.0.0

    mcollina committed Aug 20, 2021
    Copy the full SHA
    b124cea View commit details

Commits on Sep 3, 2021

  1. Copy the full SHA
    72808da View commit details

Commits on Sep 4, 2021

  1. Copy the full SHA
    cf9c502 View commit details

Commits on Sep 7, 2021

  1. Removed jmespath (#227)

    * Removed jmespath
    
    * removed search from README
    mcollina authored Sep 7, 2021
    Copy the full SHA
    0881f18 View commit details

Commits on Sep 8, 2021

  1. Bumped v7.0.0

    mcollina committed Sep 8, 2021
    Copy the full SHA
    0f89af5 View commit details

Commits on Sep 16, 2021

  1. Bump pino-abstract-transport from 0.2.0 to 0.3.0 (#228)

    Bumps [pino-abstract-transport](https://github.com/pinojs/pino-abstract-transport) from 0.2.0 to 0.3.0.
    - [Release notes](https://github.com/pinojs/pino-abstract-transport/releases)
    - [Commits](https://github.com/pinojs/pino-abstract-transport/commits)
    
    ---
    updated-dependencies:
    - dependency-name: pino-abstract-transport
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 16, 2021
    Copy the full SHA
    32127ed View commit details

Commits on Sep 17, 2021

  1. Copy the full SHA
    9c26bd4 View commit details
  2. Bumped v7.0.1

    mcollina committed Sep 17, 2021
    Copy the full SHA
    e5e3f54 View commit details

Commits on Sep 21, 2021

  1. fix: dateformat migrated to esm (#234)

    * fix: esm package migration
    
    * ci: use continue-on-error for coveralls
    
    * chore: use dateformat ^4.6.3
    
    * ci: update coveralls handling
    climba03003 authored Sep 21, 2021
    Copy the full SHA
    7e802b4 View commit details
  2. Add support for minimumLevel (#233)

    * Add support for minimumLevel
    
    * Update Readme.md
    
    Co-authored-by: Matteo Collina <matteo.collina@gmail.com>
    bitjson and mcollina authored Sep 21, 2021
    Copy the full SHA
    a1526b0 View commit details

Commits on Sep 22, 2021

  1. Copy the full SHA
    7a0c876 View commit details

Commits on Sep 28, 2021

  1. Bump actions/setup-node from 2.4.0 to 2.4.1 (#239)

    Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.4.0 to 2.4.1.
    - [Release notes](https://github.com/actions/setup-node/releases)
    - [Commits](actions/setup-node@v2.4.0...v2.4.1)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-node
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 28, 2021
    Copy the full SHA
    b701def View commit details

Commits on Oct 4, 2021

  1. Bump pino-abstract-transport from 0.3.0 to 0.4.0 (#240)

    Bumps [pino-abstract-transport](https://github.com/pinojs/pino-abstract-transport) from 0.3.0 to 0.4.0.
    - [Release notes](https://github.com/pinojs/pino-abstract-transport/releases)
    - [Commits](https://github.com/pinojs/pino-abstract-transport/commits/v0.4.0)
    
    ---
    updated-dependencies:
    - dependency-name: pino-abstract-transport
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Oct 4, 2021
    Copy the full SHA
    b04408a View commit details

Commits on Oct 13, 2021

  1. Bump tsd from 0.17.0 to 0.18.0 (#243)

    Bumps [tsd](https://github.com/SamVerschueren/tsd) from 0.17.0 to 0.18.0.
    - [Release notes](https://github.com/SamVerschueren/tsd/releases)
    - [Commits](tsdjs/tsd@v0.17.0...v0.18.0)
    
    ---
    updated-dependencies:
    - dependency-name: tsd
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Oct 13, 2021
    Copy the full SHA
    9af5d96 View commit details

Commits on Oct 14, 2021

  1. Updated to pino@7 (#245)

    * Updated to pino@7
    
    * restored old warning
    mcollina authored Oct 14, 2021
    Copy the full SHA
    35d3410 View commit details
  2. Bumped v7.1.0

    mcollina committed Oct 14, 2021
    Copy the full SHA
    bfea42e View commit details
  3. Update docs to v7 (#247)

    PabloSzx authored Oct 14, 2021
    Copy the full SHA
    ea6352b View commit details

Commits on Oct 18, 2021

  1. Bump actions/checkout from 2.3.4 to 2.3.5 (#250)

    Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v2.3.4...v2.3.5)
    
    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Oct 18, 2021
    Copy the full SHA
    4b93241 View commit details

Commits on Oct 23, 2021

  1. Copy the full SHA
    cc0902a View commit details

Commits on Oct 25, 2021

  1. Copy the full SHA
    cd44cdd View commit details

Commits on Oct 31, 2021

  1. Copy the full SHA
    64672ee View commit details

Commits on Nov 3, 2021

  1. Bump actions/checkout from 2.3.5 to 2.4.0 (#258)

    Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v2.3.5...v2.4.0)
    
    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 3, 2021
    Copy the full SHA
    40261a5 View commit details
  2. Bump pino-abstract-transport from 0.4.0 to 0.5.0 (#259)

    Bumps [pino-abstract-transport](https://github.com/pinojs/pino-abstract-transport) from 0.4.0 to 0.5.0.
    - [Release notes](https://github.com/pinojs/pino-abstract-transport/releases)
    - [Commits](pinojs/pino-abstract-transport@v0.4.0...v0.5.0)
    
    ---
    updated-dependencies:
    - dependency-name: pino-abstract-transport
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 3, 2021
    Copy the full SHA
    6037ddc View commit details
  3. Copy the full SHA
    c3a1348 View commit details
  4. Bumped v7.2.0

    mcollina committed Nov 3, 2021
    Copy the full SHA
    2945f23 View commit details

Commits on Nov 4, 2021

  1. Fixed failing test

    mcollina committed Nov 4, 2021
    Copy the full SHA
    2f57958 View commit details

Commits on Nov 16, 2021

  1. Add ability to format time and level with user-defined prettifiers (#263

    )
    
    Co-authored-by: James Sumners <james@sumners.email>
    pearofducks and jsumners authored Nov 16, 2021
    Copy the full SHA
    dcebb40 View commit details

Commits on Nov 17, 2021

  1. Copy the full SHA
    bdae36e View commit details
  2. Copy the full SHA
    36d733b View commit details

Commits on Nov 19, 2021

  1. Bump fastify/github-action-merge-dependabot from 2.4.0 to 2.6.0 (#267)

    Bumps [fastify/github-action-merge-dependabot](https://github.com/fastify/github-action-merge-dependabot) from 2.4.0 to 2.6.0.
    - [Release notes](https://github.com/fastify/github-action-merge-dependabot/releases)
    - [Commits](fastify/github-action-merge-dependabot@v2.4.0...v2.6.0)
    
    ---
    updated-dependencies:
    - dependency-name: fastify/github-action-merge-dependabot
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 19, 2021
    Copy the full SHA
    5a5dcbc View commit details
  2. Bump tsd from 0.18.0 to 0.19.0 (#269)

    Bumps [tsd](https://github.com/SamVerschueren/tsd) from 0.18.0 to 0.19.0.
    - [Release notes](https://github.com/SamVerschueren/tsd/releases)
    - [Commits](tsdjs/tsd@v0.18.0...v0.19.0)
    
    ---
    updated-dependencies:
    - dependency-name: tsd
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 19, 2021
    Copy the full SHA
    16d47b1 View commit details

Commits on Nov 20, 2021

  1. Copy the full SHA
    c070efb View commit details

Commits on Nov 22, 2021

  1. Copy the full SHA
    ddafa94 View commit details

Commits on Nov 23, 2021

  1. Copy the full SHA
    f96075f View commit details
  2. Copy the full SHA
    d1d0571 View commit details

Commits on Nov 30, 2021

  1. Bump fastify/github-action-merge-dependabot from 2.6.0 to 2.7.0 (#277)

    Bumps [fastify/github-action-merge-dependabot](https://github.com/fastify/github-action-merge-dependabot) from 2.6.0 to 2.7.0.
    - [Release notes](https://github.com/fastify/github-action-merge-dependabot/releases)
    - [Commits](fastify/github-action-merge-dependabot@v2.6.0...v2.7.0)
    
    ---
    updated-dependencies:
    - dependency-name: fastify/github-action-merge-dependabot
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 30, 2021
    Copy the full SHA
    e779f2f View commit details
  2. Fixed markdown (#278)

    sleroq authored Nov 30, 2021
    Copy the full SHA
    68b3d9e View commit details

Commits on Dec 8, 2021

  1. Copy the full SHA
    eb88841 View commit details

Commits on Dec 9, 2021

  1. Bump fastify/github-action-merge-dependabot from 2.7.0 to 2.7.1 (#281)

    Bumps [fastify/github-action-merge-dependabot](https://github.com/fastify/github-action-merge-dependabot) from 2.7.0 to 2.7.1.
    - [Release notes](https://github.com/fastify/github-action-merge-dependabot/releases)
    - [Commits](fastify/github-action-merge-dependabot@v2.7.0...v2.7.1)
    
    ---
    updated-dependencies:
    - dependency-name: fastify/github-action-merge-dependabot
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 9, 2021
    Copy the full SHA
    fd1308e View commit details

Commits on Dec 13, 2021

  1. Allow loading common js config files by default (#282)

    * Allow loading cjs files as config by default
    
    * Remove redundant joycon loader
    EchelonFour authored Dec 13, 2021
    Copy the full SHA
    4ec29b2 View commit details
  2. Bumped v7.3.0

    Signed-off-by: Matteo Collina <hello@matteocollina.com>
    mcollina committed Dec 13, 2021
    Copy the full SHA
    de1007f View commit details
Showing with 753 additions and 210 deletions.
  1. +4 −0 .github/dependabot.yml
  2. +19 −5 .github/workflows/ci.yml
  3. +1 −0 .gitignore
  4. +2 −0 .taprc
  5. +135 −18 Readme.md
  6. +13 −23 bin.js
  7. +11 −8 index.d.ts
  8. +57 −15 index.js
  9. +12 −11 lib/colors.js
  10. +15 −12 lib/utils.js
  11. +14 −14 package.json
  12. +214 −17 test/basic.test.js
  13. +24 −1 test/cli-rc.test.js
  14. +18 −36 test/cli.test.js
  15. +1 −1 test/crlf.test.js
  16. +161 −27 test/error-objects.test.js
  17. +31 −0 test/example/example.js
  18. +11 −5 test/lib/colors.test.js
  19. +10 −17 test/types/pino-pretty.test-d.ts
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -2,6 +2,10 @@ version: 2
updates:
- package-ecosystem: github-actions
directory: '/'
ignore:
- dependency-name: 'actions/*'
update-types:
['version-update:semver-minor', 'version-update:semver-patch']
schedule:
interval: daily
open-pull-requests-limit: 10
24 changes: 19 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -12,16 +12,19 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
outputs:
COVERALLS: ${{ steps.coveralls-trigger.outputs.COVERALLS_TRIGGER }}
strategy:
matrix:
node-version: [10, 12, 13, 14, 16]
node-version: [12, 14, 16]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2.4.0
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

@@ -38,15 +41,26 @@ jobs:
run: npm run ci

- name: Coveralls Parallel
id: coveralls-parallel
uses: coverallsapp/github-action@1.1.3
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: run-${{ matrix.node-version }}-${{ matrix.os }}

- name: Should Trigger coverallsapp/github-action@master
id: coveralls-trigger
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context
# when continue-on-error failed, outcome is failure and conclusion is success
if: steps.coveralls-parallel.conclusion == 'success' && steps.coveralls-parallel.outcome != 'success'
run: |
echo "::set-output name=COVERALLS_TRIGGER::failure"
coverage:
needs: build
runs-on: ubuntu-latest
if: needs.test.outputs.COVERALLS != 'failure'
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@1.1.3
@@ -58,6 +72,6 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: fastify/github-action-merge-dependabot@v2.4.0
- uses: fastify/github-action-merge-dependabot@v2.7.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
shrinkwrap.yaml
package-lock.json
yarn.lock
pnpm-lock.yaml

# Logs
logs
2 changes: 2 additions & 0 deletions .taprc
Original file line number Diff line number Diff line change
@@ -2,3 +2,5 @@ ts: false
jsx: false
flow: false
jobs: 1
files:
- 'test/**/*.test.js'
153 changes: 135 additions & 18 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -24,6 +24,9 @@ Will format to:
[1522431328992] INFO (42 on foo): hello world
```

If you landed on this page due to the deprecation of the `prettyPrint` option
of `pino`, read the [Programmatic Integration](#integration) section.

<a id="example"></a>
## Example

@@ -60,6 +63,7 @@ node app.js | pino-pretty
feed, to the formatted log line.
- `--errorProps` (`-e`): When formatting an error object, display this list
of properties. The list should be a comma-separated list of properties Default: `''`.
Do not use this option if logging from pino@7. Support will be removed from future verions.
- `--levelFirst` (`-l`): Display the log level name before the logged date and time.
- `--errorLikeObjectKeys` (`-k`): Define the log keys that are associated with
error like objects. Default: `err,error`.
@@ -69,6 +73,7 @@ node app.js | pino-pretty
Default: `level`.
- `--levelLabel` (`-b`): Output the log level using the specified label.
Default: `levelLabel`.
- `--minimumLevel` (`-L`): Hide messages below the specified log level. Accepts a number, `trace`, `debug`, `info`, `warn`, `error`, or `fatal`. If any more filtering is required, consider using [`jq`](https://stedolan.github.io/jq/).
- `--messageFormat` (`-o`): Format output of message, e.g. `{levelLabel} - {pid} - url:{request.url}` will output message: `INFO - 1123 - url:localhost:3000/test`
Default: `false`
- `--timestampKey` (`-a`): Define the key that contains the log timestamp.
@@ -81,10 +86,8 @@ node app.js | pino-pretty
- Require a `SYS:` prefix to translate time to the local system's time zone. A
shortcut `SYS:standard` to translate time to `yyyy-mm-dd HH:MM:ss.l o` in
system time zone.
- `--search` (`-s`): Specify a search pattern according to
[jmespath](http://jmespath.org/).
- `--ignore` (`-i`): Ignore one or several keys, nested keys are supported with each property delimited by a dot character (`.`),
keys may be escaped to target property names that contains the delimiter itself:
- `--ignore` (`-i`): Ignore one or several keys, nested keys are supported with each property delimited by a dot character (`.`),
keys may be escaped to target property names that contains the delimiter itself:
(`-i time,hostname,req.headers,log\\.domain\\.corp/foo`)
- `--hideObject` (`-H`): Hide objects from output (but not error object)
- `--singleLine` (`-S`): Print each log message on a single line (errors will still be multi-line)
@@ -96,45 +99,118 @@ node app.js | pino-pretty
We recommend against using `pino-pretty` in production and highly
recommend installing `pino-pretty` as a development dependency.

When installed, `pino-pretty` will be used by `pino` as the default
prettifier.

Install `pino-pretty` alongside `pino` and set the
`prettyPrint` option to `true`:
Install `pino-pretty` alongside `pino` and set the transport target to `'pino-pretty'`:

```js
const pino = require('pino')
const logger = pino({
prettyPrint: true
transport: {
target: 'pino-pretty'
},
})

logger.info('hi')
```

The `prettyPrint` option can also be an object containing `pretty-print`
options:
The transport option can also have an options object containing `pino-pretty` options:

```js
const pino = require('pino')
const logger = pino({
transport: {
target: 'pino-pretty',
options: {
colorize: true
}
}
})

logger.info('hi')
```

Use it as a stream:

```js
const pino = require('pino')
const pretty = require('pino-pretty')
const logger = pino(pretty())

logger.info('hi')
```

Options are also supported:

```js
const pino = require('pino')
const pretty = require('pino-pretty')
const stream = pretty({
prettyPrint: { colorize: true }
})
const logger = pino(stream)

logger.info('hi')
```

See the [Options](#options) section for all possible options.

If you are using `pino-pretty` as a stream and you need to provide options to `pino`,
pass the options as the first argument and `pino-pretty` as second argument:

```js
const pino = require('pino')
const pretty = require('pino-pretty')
const stream = pretty({
prettyPrint: { colorize: true }
})
const logger = pino({ level: 'info' }, stream)

// Nothing is printed
logger.debug('hi')
```


### Handling non-serializable options

Using the new [pino v7+
transports](https://getpino.io/#/docs/transports?id=v7-transports) not all
options are serializable, for example if you want to use `messageFormat` as a
function you will need to wrap `pino-pretty` in a custom module.

Executing `main.js` below will log a colorized `hello world` message using a
custom function `messageFormat`:

```js
// main.js
const pino = require('pino')

const logger = pino({
transport: {
target: './pino-pretty-transport',
options: {
colorize: true
}
},
})

logger.info('world')
```

```js
// pino-pretty-transport.js
module.exports = opts => require('pino-pretty')({
...opts,
messageFormat: (log, messageKey) => `hello ${log[messageKey]}`
})
```

<a id="options"></a>
### Options

`pino-pretty` exports a factory function that can be used to format log strings.
This factory function is used internally by Pino, and accepts an options argument
with keys corresponding to the options described in [CLI Arguments](#cliargs):
The options accepted have keys corresponding to the options described in [CLI Arguments](#cliargs):

```js
{
colorize: chalk.supportsColor, // --colorize
colorize: colorette.isColorSupported, // --colorize
crlf: false, // --crlf
errorLikeObjectKeys: ['err', 'error'], // --errorLikeObjectKeys
errorProps: '', // --errorProps
@@ -144,22 +220,29 @@ with keys corresponding to the options described in [CLI Arguments](#cliargs):
messageFormat: false, // --messageFormat
timestampKey: 'time', // --timestampKey
translateTime: false, // --translateTime
search: 'foo == `bar`', // --search
ignore: 'pid,hostname', // --ignore
hideObject: false, // --hideObject
singleLine: false, // --singleLine

// The file or file descriptor (1 is stdout) to write to
destination: 1,

// Alternatively, pass a `sonic-boom` instance (allowing more flexibility):
// destination: new SonicBoom({ dest: 'a/file', mkdir: true })

customPrettifiers: {}
}
```

The `colorize` default follows
[`chalk.supportsColor`](https://www.npmjs.com/package/chalk#chalksupportscolor).
[`colorette.isColorSupported`](https://github.com/jorgebucaran/colorette#iscolorsupported).

`customPrettifiers` option provides the ability to add a custom prettify function
for specific log properties. `customPrettifiers` is an object, where keys are
log properties that will be prettified and value is the prettify function itself.
For example, if a log line contains a `query` property,
you can specify a prettifier for it:

```js
{
customPrettifiers: {
@@ -172,13 +255,47 @@ const prettifyQuery = value => {
}
```

Additionally, `customPrettifiers` can be used to format the time and level
outputs:

```js
{
customPrettifiers: {
// The argument for this function will be the same
// string that's at the start of the log-line by default:
time: timestamp => `🕰 ${timestamp}`,

// The argument for the level-prettifier may vary depending
// on if the levelKey option is used or not.
// By default this will be the same numerics as the Pino default:
level: logLevel => `LEVEL: ${logLevel}`
}
}
```

Note that prettifiers do not include any coloring, if the stock coloring on
`level` is desired, it can be accomplished using the following:

```js
const { colorizerFactory } = require('pino-pretty')
const levelColorize = colorizerFactory(true)
const levelPrettifier = logLevel => `LEVEL: ${levelColorize(logLevel)}`
//...
{
customPrettifiers: { level: levelPrettifier }
}
```

`messageFormat` option allows you to customize the message output. A template `string` like this can define the format:

```js
{
messageFormat: '{levelLabel} - {pid} - url:{request.url}'
}
```

This option can also be defined as a `function` with this prototype:

```js
{
messageFormat: (log, messageKey, levelLabel) => {
Loading