lucid-kv / lucid

High performance and distributed KV store w/ REST API. 🦀

Home Page:https://clintnetwork.gitbook.io/lucid/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moving configuration file parsing before fern

imclint21 opened this issue · comments

Hey @CephalonRho,

Do you think we can move the configuration parsing part before fern, I mean before Dispatch::new?

Why? To configure logging:

  • Log level globally
  • Log output to the filesystem
  • Log coloring
  • Maybe configure log format in the future

Maybe you can do that with a smarter view, and maybe you have put Dispatch here for a good reason, but I think it's a good thing to do that to improve logging.

Preview:

image

PS: I will surely close #49 because it's outdated

commented

I just put it there because the configuration was only relevant when the server gets started, so there wasn't any point in loading it earlier.

If we want to configure logging (other than the log level) we'll have to move things around a bit, but it'll work just fine. Any log messages sent before the logger is created will be discarded, but we might be able to work around that if it ever becomes necessary.

I just put it there because the configuration was only relevant when the server gets started, so there wasn't any point in loading it earlier.

Yeah sure!

If we want to configure logging (other than the log level) we'll have to move things around a bit, but it'll work just fine. Any log messages sent before the logger is created will be discarded, but we might be able to work around that if it ever becomes necessary.

I think it's okay, I just continued the PR #49, I let you continue it, I need to sleep :)

Well played @CephalonRho!