microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.78k stars 2.94k forks source link

Revert to err logging instead of LOGS_DEFAULT macro #22720

Closed ivberg closed 2 weeks ago

ivberg commented 2 weeks ago

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.