mirror of
https://github.com/hyprwm/hyprutils.git
synced 2024-12-22 16:39:48 +01:00
Path: use log level LOG
This commit is contained in:
parent
360fb14385
commit
82816f0a77
1 changed files with 7 additions and 7 deletions
|
@ -18,7 +18,7 @@ namespace Hyprutils::Path {
|
|||
static const auto homeDir = getenv("HOME");
|
||||
|
||||
if (!homeDir || !std::filesystem::path(homeDir).is_absolute()) {
|
||||
Debug::log(INFO, "'$HOME' is either not found or not an absolute path");
|
||||
Debug::log(LOG, "'$HOME' is either not found or not an absolute path");
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace Hyprutils::Path {
|
|||
static const auto xdgConfigDirs = getenv("XDG_CONFIG_DIRS");
|
||||
|
||||
if (!xdgConfigDirs) {
|
||||
Debug::log(INFO, "'$XDG_CONFIG_DIRS' is not set");
|
||||
Debug::log(LOG, "'$XDG_CONFIG_DIRS' is not set");
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ namespace Hyprutils::Path {
|
|||
static const auto xdgConfigHome = getenv("XDG_CONFIG_HOME");
|
||||
|
||||
if (!xdgConfigHome || !std::filesystem::path(xdgConfigHome).is_absolute()) {
|
||||
Debug::log(INFO, "'$XDG_CONFIG_HOME' is either not found or not an absolute path");
|
||||
Debug::log(LOG, "'$XDG_CONFIG_HOME' is either not found or not an absolute path");
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ namespace Hyprutils::Path {
|
|||
configPath = fullConfigPath(xdgConfigHome.value(), programName);
|
||||
if (std::filesystem::exists(configPath))
|
||||
return std::make_pair(configPath, xdgConfigHome);
|
||||
Debug::log(INFO, "No config file {}", configPath);
|
||||
Debug::log(LOG, "No config file {}", configPath);
|
||||
}
|
||||
|
||||
bool homeExists = false;
|
||||
|
@ -70,7 +70,7 @@ namespace Hyprutils::Path {
|
|||
configPath = fullConfigPath(home.value(), programName);
|
||||
if (std::filesystem::exists(configPath))
|
||||
return std::make_pair(configPath, home);
|
||||
Debug::log(INFO, "No config file {}", configPath);
|
||||
Debug::log(LOG, "No config file {}", configPath);
|
||||
}
|
||||
|
||||
static const auto xdgConfigDirs = getXdgConfigDirs();
|
||||
|
@ -79,14 +79,14 @@ namespace Hyprutils::Path {
|
|||
configPath = fullConfigPath(dir, programName);
|
||||
if (std::filesystem::exists(configPath))
|
||||
return std::make_pair(configPath, std::nullopt);
|
||||
Debug::log(INFO, "No config file {}", configPath);
|
||||
Debug::log(LOG, "No config file {}", configPath);
|
||||
}
|
||||
}
|
||||
|
||||
configPath = fullConfigPath("/etc/xdg", programName);
|
||||
if (std::filesystem::exists(configPath))
|
||||
return std::make_pair(configPath, std::nullopt);
|
||||
Debug::log(INFO, "No config file {}", configPath);
|
||||
Debug::log(LOG, "No config file {}", configPath);
|
||||
|
||||
if (xdgConfigHomeExists)
|
||||
return std::make_pair(std::nullopt, xdgConfigHome);
|
||||
|
|
Loading…
Reference in a new issue