microsoft / durabletask-java

Java SDK for Durable Functions and the Durable Task Framework
MIT License
13 stars 7 forks source link

Structured logging #4

Open cgillum opened 2 years ago

cgillum commented 2 years ago

Requirement

Structured logging should be added to the SDK to support tracing and debugging by developers and operators. Ideally, these logs integrate naturally with the logging system used by the application host.

Proposal

The java.util.logging.Logger class can be used as the main abstraction for logging, similar to the ILogger interface in .NET.

Other considerations

Azure Functions has a particular way of doing logging and tracing for Java-based function apps. Ideally any design we consider should integrate nicely with external runtime hosts (especially Azure Functions). Azure Functions code can call context.getLogger() to get an instance of java.util.logging.Logger to use for logging.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-java?tabs=bash%2Cconsumption#logger