fix: set log level before constructing tr_session (#5345)
This commit is contained in:
parent
e68c72daa4
commit
931beba56f
|
@ -577,16 +577,16 @@ tr_session* tr_sessionInit(char const* config_dir, bool message_queueing_enabled
|
|||
|
||||
tr_timeUpdate(time(nullptr));
|
||||
|
||||
/* initialize the bare skeleton of the session object */
|
||||
auto* const session = new tr_session{ config_dir };
|
||||
bandwidthGroupRead(session, config_dir);
|
||||
|
||||
// nice to start logging at the very beginning
|
||||
if (auto val = int64_t{}; tr_variantDictFindInt(client_settings, TR_KEY_message_level, &val))
|
||||
{
|
||||
tr_logSetLevel(static_cast<tr_log_level>(val));
|
||||
}
|
||||
|
||||
/* initialize the bare skeleton of the session object */
|
||||
auto* const session = new tr_session{ config_dir };
|
||||
bandwidthGroupRead(session, config_dir);
|
||||
|
||||
auto data = tr_session::init_data{};
|
||||
data.config_dir = config_dir;
|
||||
data.message_queuing_enabled = message_queueing_enabled;
|
||||
|
|
Loading…
Reference in New Issue