Unverified Commit 36ca58a3 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

Improved log for pid file creation

parent ba5b6c4b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@ void init_environment() {
    }

    // Register daemon to system
    ADAFS_DATA->spdlogger()->debug("{}() Creating daemon pid file", __func__);
    try {
        register_daemon_proc();
    } catch (const std::exception& e ) {
@@ -264,6 +263,8 @@ void register_daemon_proc() {
    }

    auto pid_file = daemon_pid_path();
    ADAFS_DATA->spdlogger()->debug("{}() Creating pid file: '{}'",
                                    __func__, pid_file);
    // check if a pid file exists from another daemon
    if (bfs::exists(pid_file)) {
        throw runtime_error(