Skip to content

Commit 36fbdaa

Browse files
committed
fix: remove toJSON() method from LogMessage since it's been moved to a formatter
1 parent df6ac1a commit 36fbdaa

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/LogMessage.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,6 @@ export default class LogMessage implements ILogMessage {
230230
throw err;
231231
}
232232

233-
/**
234-
* Returns the compiled log object converted into JSON. This method utilizes `options.replacer` for the replacer function. It also uses
235-
* [fast-safe-stringify](https://www.npmjs.com/package/fast-safe-stringify) to prevent circular reference issues.
236-
* @param {boolean} format Whether to format the log object with line breaks and indentation.
237-
* @returns {string} The JSON string.
238-
*/
239-
toJSON(format?: boolean) {
240-
return stringify(this.value, this.__opts.replacer ?? undefined, format ? 2 : 0);
241-
}
242-
243233
/**
244234
* Converts the log to a string using a specific/custom formatter.
245235
* @returns {string} The formatted log as a string.

0 commit comments

Comments
 (0)