|
3 | 3 | #include <spdlog/sinks/systemd_sink.h>
|
4 | 4 | #include <thread>
|
5 | 5 |
|
6 |
| -#include "helpers/Helper.h" |
| 6 | +#include "common/FileLogFormatter.h" |
7 | 7 |
|
8 | 8 | #include "IO/InterfaceImpl.h"
|
9 | 9 | #include "chrono"
|
| 10 | +#include "common/FileLogFormatter.h" |
10 | 11 | #include "data/UOSMData.h"
|
11 | 12 | #include "spdlog/sinks/basic_file_sink.h"
|
12 | 13 | #include "spdlog/sinks/dup_filter_sink.h"
|
@@ -38,9 +39,10 @@ void setup_logging()
|
38 | 39 | auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>(
|
39 | 40 | "logs/global_" + std::to_string(unix_timestamp_x_1000) + ".log");
|
40 | 41 | file_sink->set_level(FILE_LOGGING_LEVEL);
|
| 42 | + file_sink->set_formatter(std::make_unique<FileLogFormatter>()); |
41 | 43 | dup_filter->add_sink(file_sink);
|
42 | 44 |
|
43 |
| - if (helper::getEnvOrDefault<std::string>("INSIDE_SERVICE", "0") == "0") |
| 45 | + if (utils::getEnvOrDefault<std::string>("INSIDE_SERVICE", "0") == "0") |
44 | 46 | {
|
45 | 47 | // Log to the console
|
46 | 48 | auto stdout_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
|
@@ -89,7 +91,7 @@ int main()
|
89 | 91 | UOSMData data = UOSMData();
|
90 | 92 |
|
91 | 93 | const auto targetUpdateDuration =
|
92 |
| - helper::getEnvOrDefault("TARGET_UPDATE_DURATION_NS", DEFAULT_TARGET_UPDATE_DURATION_NS); |
| 94 | + utils::getEnvOrDefault("TARGET_UPDATE_DURATION_NS", DEFAULT_TARGET_UPDATE_DURATION_NS); |
93 | 95 | uint64_t count = 1;
|
94 | 96 |
|
95 | 97 | while (true)
|
|
0 commit comments