Skip to content

Commit 6e1dec5

Browse files
committed
Fix anchors
1 parent b375b32 commit 6e1dec5

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ on the console which is very useful. Unfortunately those process errors:
1818
[`rejectionHandled`](https://nodejs.org/api/process.html#process_event_rejectionhandled)
1919
and
2020
[`multipleResolves`](https://nodejs.org/api/process.html#process_event_multipleresolves) making it hard to debug.
21-
- are inconvenient to [log to an external service](#custom-logging).
21+
- are inconvenient to
22+
[log to an external service](docs/options.md#optionslog-string).
2223
- cannot be conditionally skipped.
2324
- are printed each time an error is repeated (except for
2425
[`warning`](https://nodejs.org/api/process.html#process_event_warning)).
@@ -76,16 +77,16 @@ logProcessErrors(options)
7677

7778
`options` is an optional object with the following properties:
7879

79-
- [`log` `{function}`](#custom-logging): override how events are logged.
80-
Default: use `console.warn()`, `console.error()`, etc.
81-
- [`level` `{object}`](#log-level): which log level to use. Default:
82-
`{ warning: 'warn', multipleResolves: 'info', default: 'error' }`.
83-
- [`message` `{function}`](#log-message): override the default message
84-
generation.
85-
- [`colors` `{boolean}`](#log-message): colorize the default message. Default:
86-
`true`.
87-
- [`exitOn` `{string[]}`](#process-exit): which events should trigger
88-
`process.exit(1)`. Default: `['uncaughtException']`.
80+
- [`log` `{function}`](docs/options.md#optionslog-string): override how events
81+
are logged. Default: use `console.warn()`, `console.error()`, etc.
82+
- [`level` `{object}`](docs/options.md#optionslevel-object): which log level to
83+
use. Default: `{ warning: 'warn', multipleResolves: 'info', default: 'error' }`.
84+
- [`message` `{function}`](docs/options.md#optionsmessage-function): override
85+
the default message generation.
86+
- [`colors` `{boolean}`](docs/options.md#optionscolors-boolean): colorize the
87+
default message. Default: `true`.
88+
- [`exitOn` `{string[]}`](docs/options.md#optionsexiton-string): which events
89+
should trigger `process.exit(1)`. Default: `['uncaughtException']`.
8990

9091
Please see the [options full documentation](docs/options.md).
9192

docs/options.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ logProcessErrors({
2525
})
2626
```
2727

28-
The function's arguments are [`message`](#log-message) (string),
29-
[`level`](#log-level) (string) and [`info`](#event-information) (object).
28+
The function's arguments are [`message`](#optionsmessage-function) (string),
29+
[`level`](#optionslevel-object) (string) and [`info`](#event-information)
30+
(object).
3031

3132
If logging is asynchronous, the function should return a promise (or use
3233
`async`/`await`). This is not necessary if logging is using streams (like
@@ -83,7 +84,7 @@ By default a nice-looking and descriptive log message is generated.
8384

8485
## options.colors `{boolean}`
8586

86-
Colorize the default [`options.message`](#optionsmessagefunction). Default:
87+
Colorize the default [`options.message`](#optionsmessage-function). Default:
8788
`true`.
8889

8990
## options.exitOn `{string[]}`
@@ -102,8 +103,9 @@ Which events should trigger `process.exit(1)`:
102103

103104
# Event information
104105

105-
The [`log`](#custom-logging), [`level`](#log-level) and
106-
[`message`](#log-message) options all receive as argument an `info` object.
106+
The [`log`](#optionslog-string), [`level`](#optionslevel-object) and
107+
[`message`](#optionsmessage-function) options all receive as argument an `info`
108+
object.
107109

108110
## `info.eventName`
109111

@@ -145,10 +147,11 @@ the second time the promise was resolved/rejected. Only defined with
145147

146148
## `info.level`
147149

148-
[Log level](#log-level). Only defined with the [`message` option](#log-message).
150+
[Log level](#optionslevel-object). Only defined with the
151+
[`message` option](#optionsmessage-function).
149152

150153
## `info.colors`
151154

152155
[Chalk instance](https://github.com/chalk/chalk#api) to colorize strings.
153-
Only defined with the [`message` option](#log-message). Disabled if the
154-
[`colors` option](#log-message) is `false`.
156+
Only defined with the [`message` option](#optionsmessage-function). Disabled if
157+
the [`colors` option](#optionscolors-boolean) is `false`.

0 commit comments

Comments
 (0)