PaddleSharp icon indicating copy to clipboard operation
PaddleSharp copied to clipboard

[Question] Use a custom logging provider for PaddleInference

Open aboccag opened this issue 1 year ago • 3 comments

Hello,

First, thank you for your library and your great work!

I am using PaddleSharp in my project and I have activated the loggs with the boolean GLogEnabled It looks like it redirect the logs from PaddleInferenceC to the Console.Writeline / Standard output somehow. In my project I am using Serilog for logging. Is there any way to write an adapter for Serilog ?

Many thanks!

aboccag avatar Feb 14 '24 06:02 aboccag

As you guessed it's a C native method from PaddleInferernce to enable its logging towards stdout of the process, so no changes like logging to elsewhere can be made in .NET managed side. It's still possible to filter logging from PaddleInferernce out of stdout by preventing any other echoing to stdout like Serilog, then redirect the stdout to somewhere like a file with >.

n0099 avatar Feb 14 '24 07:02 n0099

Alright thank you

aboccag avatar Feb 14 '24 14:02 aboccag

Tracked by this: https://github.com/PaddlePaddle/Paddle/issues/62367

sdcb avatar Apr 16 '24 01:04 sdcb