Errors seem to escape to stdout and are not caught by the pino logger
Maybe related to this issue: https://github.com/mastra-ai/mastra/issues/9121
I am experiencing issues where critical errors are being spit to stdout instead of being captured and structured as an error log, this has the result of missing errors in out structure log observability. Here are a couple of examples of errors that spit to stdout:
Error executing step generate-draft-response: AI_APICallError: Rate limit reached
which I think is being thrown from a function called triggerUncaughtException
However I see this as well across a couple of log entries (telling me its not being captured by the logger) I also believe this one was recently fixed and merged.
1. WARNING: Creating a duplicate database object for the same connection
2. at PostgresStore.init (file:///app/node_modules/.pnpm/@mastra+pg@0.17.5_@mastra+core@0.24.0_openapi-types@12...
one that seems to be working correctly:
Error streaming chat message from Mastra
my config:
https://gist.github.com/jedschneider/bbfe7957fe7e859f0c888b685080eea9
I wanted to ensure that my config was correct to capture the errors that mastra should emit, and if the rate limit error is one that I should be catching someplace (my responsibility)?
Thanks.GitHub
[DISCORD:1430460120256479274] MastraBase uses a hardcoded ConsoleLo...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1430460120256479274 In the file: packages/core/src/base.ts, I see a hard-coded use of this.logger = new Co...
Gist
mastra logger config
mastra logger config. GitHub Gist: instantly share code, notes, and snippets.
2 Replies
š Created GitHub issue: https://github.com/mastra-ai/mastra/issues/10315
š If you're experiencing an error, please provide a minimal reproducible example to help us resolve it quickly.
š Thank you @jedschneider for helping us improve Mastra!
Hey @jedschneider i think we have places using console.error instead of a proper mastra logger. Thanks for reporting!