Kosmo Sec

Kosmo Sec

  • NA
  • 14
  • 565

Customize output in hosted CLR (.NET)

Sep 16 2021 2:34 PM

Hi, I'm hosting CLR in Golang program (but it doesn't matter where). Is the way to configure CLR to capture output from .NET assembly executed in my in-process CLR runtime straight into a file? I run .NET assembly in hosted CLR and I want to capture this output straight to the file (or some buffer).  Those applications (run in CLR) only print on standard console output using Console.WriteLine and so on. The format is just the text like Console.WriteLine("test..."). I know I can use SetStdHandle but if I run two applications in this hosted CLR the output will be mixed. I want to run many programs at the same time and I want to capture output for each specific application.