axodox / axodox-machinelearning

This repository contains a pure C++ ONNX implementation of multiple offline AI models, such as StableDiffusion (1.5 and XL), ControlNet, Midas, HED and OpenPose.
MIT License
605 stars 35 forks source link

Display ONNX logging output #5

Closed lmagder closed 1 year ago

lmagder commented 1 year ago

-Connect ONNX logging output to WinRT FileLoggingSession and also OutputDebugString -Change default level from ORT_LOGGING_LEVEL_ERROR to ORT_LOGGING_LEVEL_WARNING

I'm not sure if this was going somewhere else before and this change is redundant but I couldn't find it. If so I'll close this.

axodox commented 1 year ago

I will merge this, but I will restructure the code so it can be reused better (e.g. create a helper class for logging in my Axodox.Common lib, and abstract out the Windows only code). I will let you know how it goes.

axodox commented 1 year ago

Merged, thanks for the help. ThanksThankYouGIF

lmagder commented 1 year ago

No problem, thanks for taking a look! 👍 Not sure if you'll ever hit this, but on https://github.com/axodox/axodox-common/blob/f9fb2b61d7d6f62424d02ae740772f06f01fd067/Axodox.Common.Shared/Infrastructure/Logger.cpp#L84 it will crash if somebody logs a message with printf qualifiers in it like "%s", (unlikely to happen unless there is a bug though 😃)

axodox commented 1 year ago

Thanks for the tip.