Verified Commit b4564080 authored by Marc Vef's avatar Marc Vef
Browse files

Changing GKFS_LOG_LEVEL to GKFS_DAEMON_LOG_LEVEL

parent bd82757d
......@@ -182,13 +182,11 @@ setting the `LIBGKFS_LOG_SYSCALL_FILTER` environment variable. For instance,
setting it to `LIBGKFS_LOG_SYSCALL_FILTER=epoll_wait,epoll_create` will filter
out any log entries from the `epoll_wait()` and `epoll_create()` system calls.
Additionally, setting the `LIBGKFS_LOG_OUTPUT_TRUNC` environment variable with
a value different from `0` will instruct the logging subsystem to truncate
the file used for logging, rather than append to it.
Additionally, setting the `LIBGKFS_LOG_OUTPUT_TRUNC` environment variable with a value different from `0` will instruct
the logging subsystem to truncate the file used for logging, rather than append to it.
For the daemon, the `GKFS_DAEMON_LOG_PATH=<path/to/file>` environment variable
can be provided to set the path to the log file, and the log module can be
selected with the `GKFS_LOG_LEVEL={off,critical,err,warn,info,debug,trace}`
For the daemon, the `GKFS_DAEMON_LOG_PATH=<path/to/file>` environment variable can be provided to set the path to the
log file, and the log module can be selected with the `GKFS_DAEMON_LOG_LEVEL={off,critical,err,warn,info,debug,trace}`
environment variable.
# Miscellaneous
......
......@@ -178,5 +178,5 @@ the logging subsystem to truncate the file used for logging, rather than append
#### Daemon logging
For the daemon, the `GKFS_DAEMON_LOG_PATH=<path/to/file>` environment variable can be provided to set the path to the
log file, and the log module can be selected with the `GKFS_LOG_LEVEL={off,critical,err,warn,info,debug,trace}`
log file, and the log module can be selected with the `GKFS_DAEMON_LOG_LEVEL={off,critical,err,warn,info,debug,trace}`
environment variable whereas `trace` produces the most trace records while `info` is the default value.
\ No newline at end of file
......@@ -33,7 +33,8 @@
// environment prefixes (are concatenated in env module at compile time)
#define CLIENT_ENV_PREFIX "LIBGKFS_"
#define DAEMON_ENV_PREFIX "GKFS_"
#define DAEMON_ENV_PREFIX "GKFS_DAEMON_"
#define COMMON_ENV_PREFIX "GKFS_"
namespace gkfs::config {
......
......@@ -35,7 +35,7 @@
#include <config.hpp>
#define ADD_PREFIX(str) DAEMON_ENV_PREFIX str
#define ADD_PREFIX(str) COMMON_ENV_PREFIX str
/* Environment variables for the GekkoFS daemon */
namespace gkfs::env {
......
......@@ -459,7 +459,7 @@ initialize_loggers() {
std::string path = gkfs::config::log::daemon_log_path;
// Try to get log path from env variable
std::string env_path_key = DAEMON_ENV_PREFIX;
env_path_key += "DAEMON_LOG_PATH";
env_path_key += "LOG_PATH";
char* env_path = getenv(env_path_key.c_str());
if(env_path != nullptr) {
path = env_path;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment