Skip to content

Commit 4a32cef

Browse files
brycehutchingsrpavlik
authored andcommitted
Remove warning since it isn't logged by default in the loader
1 parent 68079d8 commit 4a32cef

File tree

4 files changed

+8
-22
lines changed

4 files changed

+8
-22
lines changed

src/api_layers/api_dump.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,6 @@ void LogPlatformUtilsError(const std::string &message) {
7676
OutputDebugStringA((message + "\n").c_str());
7777
#endif
7878
}
79-
void LogPlatformUtilsWarning(const std::string &message) {
80-
std::cout << message << std::endl;
81-
#if defined(XR_OS_WINDOWS)
82-
OutputDebugStringA((message + "\n").c_str());
83-
#endif
84-
}
8579

8680
// HTML utilities
8781
bool ApiDumpLayerWriteHtmlHeader() {

src/api_layers/core_validation.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,6 @@ void LogPlatformUtilsError(const std::string &message) {
218218
OutputDebugStringA((message + "\n").c_str());
219219
#endif
220220
}
221-
void LogPlatformUtilsWarning(const std::string &message) {
222-
std::cout << message << std::endl;
223-
#if defined(XR_OS_WINDOWS)
224-
OutputDebugStringA((message + "\n").c_str());
225-
#endif
226-
}
227221

228222
// Function to record all the core validation information
229223
void CoreValidLogMessage(GenValidUsageXrInstanceInfo *instance_info, const std::string &message_id,

src/common/platform_utils.hpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@
3636
#include "common_config.h"
3737
#endif // OPENXR_HAVE_COMMON_CONFIG
3838

39-
// Consumers of this file must ensure these two functions are implemented. For example, the loader will implement these functions so
40-
// that it can route messages through the loader's logging system.
39+
// Consumers of this file must ensure this function is implemented. For example, the loader will implement this function so that it
40+
// can route messages through the loader's logging system.
4141
void LogPlatformUtilsError(const std::string& message);
42-
void LogPlatformUtilsWarning(const std::string& message);
4342

4443
// Environment variables
4544
#if defined(XR_OS_LINUX) || defined(XR_OS_APPLE)
@@ -85,9 +84,9 @@ static inline std::string PlatformUtilsGetSecureEnv(const char* name) {
8584
if (str == nullptr) {
8685
str = detail::ImplGetEnv(name);
8786
if (!str.empty()) {
88-
LogPlatformUtilsWarning(std::string("!!! WARNING !!! Environment variable ") + name +
89-
" is being ignored due to running with secure execution. The value '" + str +
90-
"' will NOT be used.");
87+
LogPlatformUtilsError(std::string("!!! WARNING !!! Environment variable ") + name +
88+
" is being ignored due to running with secure execution. The value '" + str +
89+
"' will NOT be used.");
9190
}
9291
return {};
9392
}
@@ -266,9 +265,9 @@ static inline std::string PlatformUtilsGetSecureEnv(const char* name) {
266265
// Do not allow high integrity processes to act on data that can be controlled by medium integrity processes.
267266
if (IsHighIntegrityLevel()) {
268267
if (!envValue.empty()) {
269-
LogPlatformUtilsWarning(std::string("!!! WARNING !!! Environment variable ") + name +
270-
" is being ignored due to running from an elevated context. The value '" + envValue +
271-
"' will NOT be used.");
268+
LogPlatformUtilsError(std::string("!!! WARNING !!! Environment variable ") + name +
269+
" is being ignored due to running from an elevated context. The value '" + envValue +
270+
"' will NOT be used.");
272271
}
273272
return {};
274273
}

src/loader/loader_logger.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
// For routing platform_utils.hpp messages into the LoaderLogger.
3030
void LogPlatformUtilsError(const std::string& message) { LoaderLogger::LogErrorMessage("platform_utils", message); }
31-
void LogPlatformUtilsWarning(const std::string& message) { LoaderLogger::LogWarningMessage("platform_utils", message); }
3231

3332
bool LoaderLogRecorder::LogDebugUtilsMessage(XrDebugUtilsMessageSeverityFlagsEXT /*message_severity*/,
3433
XrDebugUtilsMessageTypeFlagsEXT /*message_type*/,

0 commit comments

Comments
 (0)