1

I have an Azure Function app that uses other DLLs. I'm trying to get the logging from those DLLs, which uses TraceSource or Trace.*, to show up in the azure functions/webjobs host window when running locally (and hopefully when running in Azure). Is there any way to connect them, like adding a TraceListener statically that pipes into the host?

Janusz Nowak
  • 2,595
  • 1
  • 17
  • 36
Josh
  • 6,944
  • 8
  • 41
  • 64

1 Answers1

0

There's a solution for wiring up a TraceListener here: https://github.com/Azure/azure-webjobs-sdk-script/issues/688. Let me know if that works for you.

brettsam
  • 2,702
  • 1
  • 15
  • 24
  • That's the other direction. I don't want to add a listener. There already is one (or something) that the Azure Functions host uses to display things logged via the `TraceWriter` parameter in each function, but normal tracing doesn't seem to go to it. – Josh Sep 20 '17 at 21:23
  • You have a library that uses `Trace.Writeline()` (or similar) and want it to go to the Functions logs? That link shows how you can to wire up a Listener that pushes those traces through the TraceWriter. Nothing in Functions/WebJobs explicitly looks for traces like that today, so you'd need to wire one up and send it through the Functions TraceWriter. – brettsam Sep 21 '17 at 13:15