Skip to content

Commit 2e4ac06

Browse files
committed
new line in the end of log
1 parent 4e2b60f commit 2e4ac06

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/cli/main.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,26 @@ void setupLogging(const int argc, const char** const argv)
103103
int main(const int argc, const char** const argv)
104104
{
105105
using std::chrono_literals::operator""s;
106+
using Executor = ocvsmd::platform::SingleThreadedExecutor;
106107

107108
setupSignalHandlers();
108109
setupLogging(argc, argv);
109110

110-
spdlog::info("ocvsmd cli started (ver='{}.{}').", VERSION_MAJOR, VERSION_MINOR);
111+
spdlog::info("OCVSMD client started (ver='{}.{}').", VERSION_MAJOR, VERSION_MINOR);
111112
int result = EXIT_SUCCESS;
112113
try
113114
{
114-
auto& memory = *cetl::pmr::new_delete_resource();
115-
ocvsmd::platform::SingleThreadedExecutor executor;
115+
auto& memory = *cetl::pmr::new_delete_resource();
116+
Executor executor;
116117

117118
const auto daemon = ocvsmd::sdk::Daemon::make(memory, executor);
118119
if (!daemon)
119120
{
120-
std::cerr << "Failed to create daemon.\n";
121+
spdlog::critical("Failed to create daemon.\n");
122+
std::cerr << "Failed to create daemon.";
121123
return EXIT_FAILURE;
122124
}
125+
123126
while (g_running != 0)
124127
{
125128
const auto spin_result = executor.spinOnce();
@@ -147,7 +150,7 @@ int main(const int argc, const char** const argv)
147150
spdlog::critical("Unhandled exception: {}", ex.what());
148151
result = EXIT_FAILURE;
149152
}
150-
spdlog::info("OCVSMD cli terminated.");
153+
spdlog::info("OCVSMD client terminated.\n");
151154

152155
return result;
153156
}

src/daemon/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ int main(const int argc, const char** const argv)
395395
Application application;
396396
if (const auto failure_str = application.init())
397397
{
398-
spdlog::critical("Failed to init application: {}", failure_str.value());
398+
spdlog::critical("Failed to init application: {}\n", failure_str.value());
399399

400400
// Report the failure to the parent process (if daemonized; otherwise goes to stderr).
401401
writeString(pipe_write_fd, "Failed to init application: ");
@@ -414,7 +414,7 @@ int main(const int argc, const char** const argv)
414414
spdlog::debug("Received termination signal.");
415415
}
416416
}
417-
spdlog::info("OCVSMD daemon terminated.");
417+
spdlog::info("OCVSMD daemon terminated.\n");
418418

419419
return EXIT_SUCCESS;
420420
}

0 commit comments

Comments
 (0)