Skip to content
Snippets Groups Projects
Commit b014a624 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

refactor: setup logging ASAP

parent a83d56d8
No related branches found
No related tags found
1 merge request!893feat: --config parameter to specify picodata configuration file
......@@ -9,6 +9,10 @@ use crate::{ipc, tarantool_main, tlog, Entrypoint, IpcMessage};
use super::args;
pub fn main(args: args::Run) -> ! {
// Set the log level as soon as possible to not miss any messages during
// initialization.
tlog::set_log_level(args.log_level());
// Tarantool implicitly parses some environment variables.
// We don't want them to affect the behavior and thus filter them out.
for (k, _) in std::env::vars() {
......
......@@ -577,7 +577,6 @@ fn init_common(args: &args::Run, cfg: &tarantool::Cfg) -> (Clusterwide, RaftSpac
fn start_discover(args: &args::Run, to_supervisor: ipc::Sender<IpcMessage>) -> Result<(), Error> {
tlog!(Info, ">>>>> start_discover()");
tlog::set_log_level(args.log_level());
luamod::setup(args);
assert!(tarantool::cfg().is_none());
......@@ -677,7 +676,6 @@ fn start_boot(args: &args::Run) -> Result<(), Error> {
let raft_id = instance.raft_id;
let instance_id = instance.instance_id.clone();
tlog::set_log_level(args.log_level());
luamod::setup(args);
assert!(tarantool::cfg().is_none());
......@@ -784,7 +782,6 @@ fn start_join(args: &args::Run, instance_address: String) -> Result<(), Error> {
}
};
tlog::set_log_level(args.log_level());
luamod::setup(args);
assert!(tarantool::cfg().is_none());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment