fullstack-build / tslog

📝 tslog - Universal Logger for TypeScript and JavaScript
https://tslog.js.org
MIT License
1.35k stars 63 forks source link

Bug: Error logging with bun@1.1.0 has issues #283

Open mgcrea opened 8 months ago

mgcrea commented 8 months ago

Describe the bug When logging a simple error when using bun:

log.fatal(new Error("I am a pretty Error with a stacktrace."));

The output log is somehow broken with many empty lines:

 Error  I am a pretty Error with a stacktrace., 26, 20, 26, 20, /Users/foo/Projects/bar/baz/src/app.ts
error stack:
  • app.ts      module code
        /src/app.ts:26
  • 

  • 

  • 

  • 

To Reproduce Steps to reproduce the behavior:

  1. Start a ts file with bun@1.1.0
  2. log.fatal(new Error("I am a pretty Error with a stacktrace."));

Expected behavior No see empty lines

Bun Version 1.1.0

drewbitt commented 7 months ago

https://bun.sh/docs/runtime/nodejs-apis

Bun's goal is to have full node compatability. If a package does not work in bun but does in node, the issue should be opened in bun, not the package itself.