akash-network / console

Deploy docker containers on the Akash Network
https://console.akash.network
Apache License 2.0
85 stars 55 forks source link

feat(observability): utilise new logger in stats-web #462

Open forbesus opened 2 weeks ago

forbesus commented 2 weeks ago

ref #436

forbesus commented 1 week ago

would you check this pr? @ygrishajev

forbesus commented 1 week ago

all things are completed @ygrishajev

forbesus commented 1 week ago

how about now? @ygrishajev

forbesus commented 1 week ago

so I have LOG_LEVEL=debug but it's not picked up by config in the browser. I think config needs to be provided to the LoggerService constructor.

i am not sure what this meaning exactly could you tell me more detail?

ygrishajev commented 1 week ago

@forbesus LOG_LEVEL is an env var

LOG_LEVEL: z.enum(["fatal", "error", "warn", "info", "debug", "trace"]).optional().default("info"),

which controls which logs are done. It is a great way to configure logger on the backend, but it wouldn't work in most frontend implementations.

So LoggerService should probably implement both env vars and config object as param in constructor.

forbesus commented 1 week ago

how about now? @ygrishajev

forbesus commented 1 week ago

please check again @ygrishajev

forbesus commented 1 week ago

how about now? @ygrishajev