Skip to content

Commit f7ab850

Browse files
committed
Document option log
1 parent c511f11 commit f7ab850

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

β€ŽREADME.mdβ€Ž

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Error handler for CLI applications.
1818
- πŸš’ [Graceful exit](#-timeout)
1919
- ⛑️ [Normalize](https://github.com/ehmicky/normalize-exception) invalid errors
2020
- πŸ”• Log verbosity: [message](#-silent), [stack](#-stack), [properties](#-props)
21-
- 🚨 Custom [exit code](#-exitcode)
21+
- 🚨 Custom [exit code](#-exitcode) and [log function](#-log)
2222
- πŸ’₯ Exception-safe
2323

2424
# Screenshot
@@ -163,6 +163,13 @@ Special values:
163163
- `Number.POSITIVE_INFINITY`: Waits for ongoing tasks forever, without timing
164164
out
165165

166+
#### πŸ“œ log
167+
168+
_Type_: `(string) => void`\
169+
_Default_: `console.error`
170+
171+
Function used to print the error message.
172+
166173
#### πŸ’£ classes
167174

168175
_Type_: `object`\

β€Žsrc/main.d.tsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export type Options = BeautifulErrorOptions & {
4444
readonly timeout?: number
4545

4646
/**
47+
* Function used to print the error message.
4748
*
4849
* @default console.error
4950
*/

0 commit comments

Comments
Β (0)