mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
log: add log level none
This commit is contained in:
parent
6332312853
commit
fedd97b8c0
2 changed files with 7 additions and 2 deletions
|
@ -7,6 +7,9 @@ namespace dxvk {
|
|||
Logger::Logger(const std::string& file_name)
|
||||
: m_minLevel(getMinLogLevel())
|
||||
{
|
||||
if (m_minLevel == LogLevel::None)
|
||||
return;
|
||||
|
||||
std::string path = env::getEnvVar(L"DXVK_LOG_PATH");
|
||||
std::string file = path;
|
||||
if (!file.empty() && *file.rbegin() != '/')
|
||||
|
@ -64,12 +67,13 @@ namespace dxvk {
|
|||
|
||||
|
||||
LogLevel Logger::getMinLogLevel() {
|
||||
const std::array<std::pair<const char*, LogLevel>, 5> logLevels = {{
|
||||
const std::array<std::pair<const char*, LogLevel>, 6> logLevels = {{
|
||||
{ "trace", LogLevel::Trace },
|
||||
{ "debug", LogLevel::Debug },
|
||||
{ "info", LogLevel::Info },
|
||||
{ "warn", LogLevel::Warn },
|
||||
{ "error", LogLevel::Error },
|
||||
{ "none", LogLevel::None },
|
||||
}};
|
||||
|
||||
const std::string logLevelStr = env::getEnvVar(L"DXVK_LOG_LEVEL");
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace dxvk {
|
|||
Info = 2,
|
||||
Warn = 3,
|
||||
Error = 4,
|
||||
None = 5,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -49,4 +50,4 @@ namespace dxvk {
|
|||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue