Skip to content

Commit

Permalink
add crlf in LoggerOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dotslashtarun committed Apr 14, 2023
1 parent b9ac6e3 commit c85b3e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pino.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,11 @@ declare namespace pino {
* Optional child creation callback.
*/
onChild?: OnChildCallback;

/**
* logs newline delimited JSON with `\r\n` instead of `\n`. Default: `false`.
*/
crlf?: boolean;
}

interface ChildLoggerOptions {
Expand Down
4 changes: 4 additions & 0 deletions test/types/pino.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,7 @@ const withChildCallback = pino({
})
withChildCallback.onChild = (child: Logger) => {}

pino({
crlf: true,
});

0 comments on commit c85b3e2

Please sign in to comment.