|
75 | 75 | #include "utils/flags.h" |
76 | 76 | #include "utils/fmt_logging.h" |
77 | 77 | #include "utils/join_point.h" |
78 | | -#include "utils/logging_provider.h" |
79 | 78 | #include "utils/process_utils.h" |
80 | 79 | #include "utils/string_conv.h" |
81 | 80 | #include "utils/strings.h" |
82 | 81 | #include "utils/sys_exit_hook.h" |
83 | 82 | #include "utils/threadpool_spec.h" |
| 83 | +#include "utils/logging.h" |
84 | 84 |
|
85 | 85 | DSN_DEFINE_bool( |
86 | 86 | core, |
@@ -343,33 +343,6 @@ inline void dsn_global_init() |
343 | 343 | dsn::service_engine::instance(); |
344 | 344 | } |
345 | 345 |
|
346 | | -static std::string dsn_log_prefixed_message_func() |
347 | | -{ |
348 | | - const int tid = dsn::utils::get_current_tid(); |
349 | | - const auto t = dsn::task::get_current_task_id(); |
350 | | - if (t) { |
351 | | - if (nullptr != dsn::task::get_current_worker2()) { |
352 | | - return fmt::format("{}.{}{}.{:016}: ", |
353 | | - dsn::task::get_current_node_name(), |
354 | | - dsn::task::get_current_worker2()->pool_spec().name, |
355 | | - dsn::task::get_current_worker2()->index(), |
356 | | - t); |
357 | | - } else { |
358 | | - return fmt::format( |
359 | | - "{}.io-thrd.{}.{:016}: ", dsn::task::get_current_node_name(), tid, t); |
360 | | - } |
361 | | - } else { |
362 | | - if (nullptr != dsn::task::get_current_worker2()) { |
363 | | - return fmt::format("{}.{}{}: ", |
364 | | - dsn::task::get_current_node_name(), |
365 | | - dsn::task::get_current_worker2()->pool_spec().name, |
366 | | - dsn::task::get_current_worker2()->index()); |
367 | | - } else { |
368 | | - return fmt::format("{}.io-thrd.{}: ", dsn::task::get_current_node_name(), tid); |
369 | | - } |
370 | | - } |
371 | | -} |
372 | | - |
373 | 346 | bool run(const char *config_file, |
374 | 347 | const char *config_arguments, |
375 | 348 | bool is_server, |
@@ -473,10 +446,7 @@ bool run(const char *config_file, |
473 | 446 | } |
474 | 447 |
|
475 | 448 | // Initialize logging. |
476 | | - dsn_log_init(spec.logging_factory_name, |
477 | | - spec.log_dir, |
478 | | - fmt::format("{}", fmt::join(app_names, ".")), |
479 | | - dsn_log_prefixed_message_func); |
| 449 | + dsn_log_init(spec.log_dir, fmt::format("{}", fmt::join(app_names, "."))); |
480 | 450 |
|
481 | 451 | // Prepare the minimum necessary. |
482 | 452 | ::dsn::service_engine::instance().init_before_toollets(spec); |
|
0 commit comments