Skip to content

Commit 8633a7f

Browse files
committed
Fix anchors
1 parent 3af21c7 commit 8633a7f

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ on the console which is very useful. Unfortunately those errors:
1717
[`rejectionHandled`](https://nodejs.org/api/process.html#process_event_rejectionhandled)
1818
and
1919
[`multipleResolves`](https://nodejs.org/api/process.html#process_event_multipleresolves) making it hard to debug.
20-
- are inconvenient to
21-
[log to an external service](docs/API.md#optionslog-string).
20+
- are inconvenient to [log to an external service](docs/API.md#log).
2221
- cannot be conditionally skipped.
2322
- are printed each time an error is repeated (except for
2423
[`warning`](https://nodejs.org/api/process.html#process_event_warning)).
@@ -76,16 +75,14 @@ logProcessErrors(options)
7675

7776
`options` is an optional object with the following properties:
7877

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

9087
Please see the [options full documentation](docs/API.md).
9188

docs/API.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ logProcessErrors({
3535
})
3636
```
3737

38-
The function's arguments are [`message`](#optionsmessage-function) (string),
39-
[`level`](#optionslevel-object) (string) and [`event`](#event) (object).
38+
The function's arguments are [`message`](#message) (string), [`level`](#level)
39+
(string) and [`event`](#event) (object).
4040

4141
If logging is asynchronous, the function should return a promise (or use
4242
`async`/`await`). This is not necessary if logging is using streams (like
@@ -87,15 +87,15 @@ logProcessErrors({
8787
_Type_: `function(level, event, options) => string`<br>
8888
_Default_: generate a nice-looking and descriptive log message.
8989

90-
Override the default message generation. Arguments are
91-
[`level`](#optionslevel-object), [`event`](#event) and [`options`](#options).
90+
Override the default message generation. Arguments are [`level`](#level),
91+
[`event`](#event) and [`options`](#options).
9292

9393
#### colors
9494

9595
_Type_: `boolean`<br>
9696
_Default_: `true` if the output is a terminal.
9797

98-
Colorize the default [`options.message`](#optionsmessage-function).
98+
Colorize the default [`options.message`](#message).
9999

100100
#### exitOn
101101

@@ -117,9 +117,8 @@ Which events should trigger `process.exit(1)`:
117117

118118
_Type_: `object`
119119

120-
The [`log`](#optionslog-string), [`level`](#optionslevel-object) and
121-
[`message`](#optionsmessage-function) options all receive as argument an `event`
122-
object.
120+
The [`log`](#log), [`level`](#level) and [`message`](#message) options all
121+
receive as argument an `event` object.
123122

124123
#### event.name
125124

0 commit comments

Comments
 (0)