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

Introduce logging framework/library #4

Open
Eskibear opened this issue Mar 14, 2024 · 0 comments
Open

Introduce logging framework/library #4

Eskibear opened this issue Mar 14, 2024 · 0 comments

Comments

@Eskibear
Copy link
Member

The vanilla console.log/warn/error is convenient, and works on both client-side (browser) and server-side(e.g. nodejs) apps. But it only prints to stdout/stderr.

Popular logging frameworks like winston is powerful, providing different log levels, different format of output (stdout, a file, and a database etc.). But is not directly working on client-side so far, and introduce more dependencies.

A feasible solution is using a customized logger, and delegate logger.log to console.log or winston based on running environment.

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

No branches or pull requests

1 participant