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

Make client logger modular #3922

Open
scorbajio opened this issue Mar 18, 2025 · 0 comments
Open

Make client logger modular #3922

scorbajio opened this issue Mar 18, 2025 · 0 comments

Comments

@scorbajio
Copy link
Contributor

scorbajio commented Mar 18, 2025

The big picture is that we want to create further separation between the client source and bin directories, the former containing client logic for e.g. the networking layer, logging, execution/syncing and the latter containing the import and instantiation of the logic contained in source, so that we can provide different client binaries, like a minimal security-focused one, one that is only for stateless verification and doesn't have to import any syncing logic, etc.

The logger currently is instantiated in the source directory and passed up to the binary directory through a function called getLogger:
run() -> generateClientConfig() -> getLogger() -> createLogger()

Furthermore, the logger is typed as a winston logger.

We want to generalize the logger used with the client, to do this we can create a new general logger interface and implement a wrapping logger class around winston and as a more minimal option at this stage, a pure console.log logger class can be created to test as a reference to the winston one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant