Skip to content

Commit 79ab38c

Browse files
committed
Remove log filename deprecation
Signed-off-by: Russell McGuire <russell.w.mcguire@intel.com>
1 parent c27347d commit 79ab38c

2 files changed

Lines changed: 10 additions & 18 deletions

File tree

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ To enable this debug tracing feature, set the environment variable `ZE_ENABLE_LO
5353
This will enforce the Loader to print all errors whether fatal or non-fatal to stderr with the PREFIX `ZE_LOADER_DEBUG_TRACE:`.
5454

5555

56-
# Logging to File - PREVIEW
56+
# Logging to File
5757
The Level Zero Loader provides built-in logging controlled via environment variables:
5858

5959
| Environment Variable | Default | Description |
6060
|---|---|---|
6161
| `ZEL_ENABLE_LOADER_LOGGING` | `0` | Set to `1` to enable file logging |
62-
| `ZEL_LOADER_LOG_CONSOLE` | `0` | Set to `1` to enable console (stderr) logging |
62+
| `ZEL_LOADER_LOG_CONSOLE` | `0` | Set to `1` to enable console (stderr) logging, overrides file logging |
6363
| `ZEL_LOADER_LOGGING_LEVEL` | `warn` | Log level: `trace`, `debug`, `info`, `warn`, `error`, `critical`, `off` |
6464
| `ZEL_LOADER_LOG_DIR` | `~/.oneapi_logs` | Directory to write the log file into |
65-
| `ZEL_LOADER_LOG_FILE` | `ze_loader.log` | Log filename (**deprecated**, will be removed in a future release) |
65+
| `ZEL_LOADER_LOG_FILE` | `ze_loader.log` | Log filename |
6666
| `ZEL_LOADER_LOG_PATTERN` | see below | Custom log format pattern |
6767

6868
## Output destination
@@ -98,8 +98,6 @@ Supported pattern tokens:
9898
- `%$` — end color range
9999
- `%v` — log message
100100

101-
This feature is in early development and is preview only.
102-
103101
# Logging API calls
104102
The Level Zero Loader will log all API calls whenever logging level is set to `trace` and
105103
validation layer is enabled. Following variables need to be set to enable API logging:

source/utils/ze_logger.cpp

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,6 @@ std::shared_ptr<ZeLogger> createLogger() {
472472
auto loader_file = getenv_string("ZEL_LOADER_LOG_FILE");
473473
if (loader_file.empty()) {
474474
loader_file = LOADER_LOG_FILE;
475-
} else {
476-
std::cout << "ZEL_LOADER_LOG_FILE will be deprecated in a future release" << std::endl;
477475
}
478476

479477
#ifdef _WIN32
@@ -533,17 +531,13 @@ std::shared_ptr<ZeLogger> createLogger() {
533531
// confirm what was enabled and where output is going.
534532
std::string cfg;
535533
cfg = "Loader logging enabled:";
536-
cfg += "\n Output : " + output_dest;
537-
cfg += "\n Level : " + log_level;
538-
cfg += "\n Pattern : " + log_pattern;
539-
if (!getenv_string("ZEL_LOADER_LOG_DIR").empty())
540-
cfg += "\n Log dir : " + log_directory + " (ZEL_LOADER_LOG_DIR)";
541-
if (!getenv_string("ZEL_LOADER_LOG_FILE").empty())
542-
cfg += "\n Log file : " + loader_file + " (ZEL_LOADER_LOG_FILE, deprecated)";
543-
if (!getenv_string("ZEL_LOADER_LOGGING_LEVEL").empty())
544-
cfg += "\n Level src : ZEL_LOADER_LOGGING_LEVEL";
545-
if (!getenv_string("ZEL_LOADER_LOG_PATTERN").empty())
546-
cfg += "\n Pattern src: ZEL_LOADER_LOG_PATTERN";
534+
cfg += "\n ZEL_LOADER_LOG_CONSOLE : " + std::string(log_console ? "stderr" : "disabled");
535+
cfg += "\n ZEL_ENABLE_LOADER_LOGGING : " + std::string(logging_enabled ? "enabled" : "disabled");
536+
cfg += "\n ZEL_LOADER_LOGGING_LEVEL : " + log_level;
537+
cfg += "\n ZEL_LOADER_LOG_DIR : " + log_directory;
538+
cfg += "\n ZEL_LOADER_LOG_FILE : " + loader_file;
539+
cfg += "\n ZEL_LOADER_LOG_PATTERN : " + log_pattern;
540+
cfg += "\n Output : " + output_dest;
547541
logger->info(cfg);
548542

549543
return logger;

0 commit comments

Comments
 (0)