Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output provider logs as JSON #1517

Merged
merged 5 commits into from
Nov 13, 2024
Merged

Output provider logs as JSON #1517

merged 5 commits into from
Nov 13, 2024

Conversation

forgetso
Copy link
Member

@forgetso forgetso commented Nov 13, 2024

Will allow us to count types of logs.

{"date":"2024-11-13T12:22:00.024Z","args":["GetClientList task...."],"type":"info","tag":"ProsopoEnvironment","level":3}
{"date":"2024-11-13T12:22:00.043Z","args":["Mongo url: mongodb+srv://prosopo-<Credentials>@cluster0.xxx.mongodb.net/prosopo?retryWrites=true&w=majority"],"type":"info","tag":"Tasks","level":3}
{"date":"2024-11-13T12:22:00.046Z","args":["Database disconnected from mongodb+srv://prosopo-<Credentials>@cluster0.xxx.mongodb.net/prosopo?retryWrites=true&w=majority"],"type":"info","tag":"Tasks","level":3}
{"date":"2024-11-13T12:22:00.046Z","args":["Database error: Error: querySrv ESERVFAIL _mongodb._tcp.cluster0.xxx.mongodb.net"],"type":"error","tag":"Tasks","level":0}
{"date":"2024-11-13T12:22:00.046Z","args":["Database connection error: Error: querySrv ESERVFAIL _mongodb._tcp.cluster0.xxx.mongodb.net"],"type":"error","tag":"Tasks","level":0}
{"date":"2024-11-13T12:22:00.046Z","args":[{"code":"ESERVFAIL","syscall":"querySrv","hostname":"_mongodb._tcp.cluster0.xxx.mongodb.net"}],"type":"error","tag":"Tasks","level":0}

Based on: unjs/consola#262

packages/common/src/logger.ts Outdated Show resolved Hide resolved
@forgetso forgetso merged commit bd09499 into staging Nov 13, 2024
4 checks passed
@forgetso forgetso deleted the json-logs branch November 13, 2024 13:23
This was referenced Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants