[metrics] Fix log output for metrics

Even if the configured log level for the application was set to "error",
the first "info" message of the metrics library was output to the log.
Reorder the initialization of the metrics library.
This commit is contained in:
Bostjan Meglic 2022-09-07 07:38:55 +00:00 committed by Sukchan Lee
parent 1c3876517f
commit b084edeee1
2 changed files with 6 additions and 6 deletions

View File

@ -49,13 +49,13 @@ int amf_initialize()
rv = amf_m_tmsi_pool_generate();
if (rv != OGS_OK) return rv;
rv = amf_metrics_open();
if (rv != 0) return OGS_ERROR;
rv = ogs_log_config_domain(
ogs_app()->logger.domain, ogs_app()->logger.level);
if (rv != OGS_OK) return rv;
rv = amf_metrics_open();
if (rv != 0) return OGS_ERROR;
rv = amf_sbi_open();
if (rv != OGS_OK) return rv;

View File

@ -55,9 +55,6 @@ int mme_initialize()
rv = mme_context_parse_config();
if (rv != OGS_OK) return rv;
rv = mme_metrics_open();
if (rv != 0) return OGS_ERROR;
rv = ogs_log_config_domain(
ogs_app()->logger.domain, ogs_app()->logger.level);
if (rv != OGS_OK) return rv;
@ -65,6 +62,9 @@ int mme_initialize()
rv = mme_m_tmsi_pool_generate();
if (rv != OGS_OK) return rv;
rv = mme_metrics_open();
if (rv != 0) return OGS_ERROR;
rv = mme_fd_init();
if (rv != OGS_OK) return OGS_ERROR;