mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-12 17:57:38 +00:00
Revert to err logging instead of LOGS_DEFAULT macro (#22720)
Revert to err logging instead of LOGS_DEFAULT macro due to issue seen during testing. "onnxruntime::logging::LoggingManager::DefaultLogger Attempt to use DefaultLogger but none has been registered." ### Description Revert part of PR suggestion to prevent crash for scenario seen in #22699. Previously we had tested w/o this macro ### Motivation and Context Previous PR #22699 it was suggested to use LOGS_DEFAULT() but that does not work during early init. Safer to use std::cerr instead like the original PR had it.
This commit is contained in:
parent
3711a655bc
commit
db72096d17
1 changed files with 3 additions and 1 deletions
|
|
@ -160,7 +160,9 @@ void EtwRegistrationManager::LazyInitialize() {
|
|||
if (FAILED(etw_status_)) {
|
||||
// Registration can fail when running under Low Integrity process, and should be non-fatal
|
||||
initialization_status_ = InitializationStatus::Failed;
|
||||
LOGS_DEFAULT(WARNING) << "Error in ETW registration: " << std::to_string(etw_status_);
|
||||
// Injection of ETW logger can happen very early if ETW provider was already listening.
|
||||
// Don't use LOGS_DEFAULT here or can get "Attempt to use DefaultLogger but none has been registered"
|
||||
std::cerr << "Error in ETW registration: " << std::to_string(etw_status_) << std::endl;
|
||||
}
|
||||
initialization_status_ = InitializationStatus::Initialized;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue