Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

refactor(utils): make logger decoupled from dsn runtime #403

Merged
merged 66 commits into from Mar 2, 2020

Conversation

levy5307
Copy link
Contributor

The logger API, is tightly coupled in rdsn runtime for historical issues. As a part of the long-term plan of rdsn (see #141 ) we decoupled it to make further refactoring possible.

@neverchanje
Copy link
Contributor

neverchanje commented Feb 26, 2020

If the config file is not loaded by dsn_runtime, we can get nothing from it

dsn_runtime depends on config-lib, you misunderstood that config-lib depends on dsn_runtime. Every application can use dsn_config_load to read config, it's not limited to dsn_runtime only.

    if (!dsn_config_load(config_file, config_arguments)) {
        printf("Fail to load config file %s\n", config_file);
        return false;
    }

So logger depends on config-lib is reasonable.
We can first decouple logger from dsn_runtime, then in PR afterward we can decouple logger with config-lib, if it's worthwhile.

neverchanje
neverchanje previously approved these changes Feb 28, 2020
neverchanje
neverchanje previously approved these changes Feb 28, 2020
src/core/core/logging.cpp Outdated Show resolved Hide resolved
src/core/core/logging.cpp Show resolved Hide resolved
src/core/tools/common/simple_logger.h Outdated Show resolved Hide resolved
acelyc111
acelyc111 previously approved these changes Mar 2, 2020
Refactoring automation moved this from Review in progress to Reviewer approved Mar 2, 2020
@levy5307 levy5307 merged commit f6604cb into XiaoMi:master Mar 2, 2020
Refactoring automation moved this from Reviewer approved to Done Mar 2, 2020
@levy5307 levy5307 deleted the logger branch May 26, 2020 06:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Refactoring
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants