Azure / Azure/azure-functions-java-library

The current logging is not user friendly. Any plan for supporting Slf4j in future?

Open
#71 2 comments 15 reactions 0 assignees View on GitHub
area:java-functions
Dominant language
Java
Stars
45
Forks
49
PR merge metrics
No merged PRs in 30d

Description

In my understanding the only current logging option is to get a Logger instance from ExecutionContext. we have to pass this logger instance onto any dependency method incase we want to add more loggings in dependent methods too. Also java.util.Logger is an older way to manage logs in java application which is not user friendly.
Here is a link - (https://stackoverflow.com/questions/11359187/why-not-use-java-util-logging)

slf4j(https://www.slf4j.org/) is a nice framework to manage logs in a user friendly way.Its also supports a better and user friendly string substitution for logs (https://www.slf4j.org/api/org/slf4j/helpers/MessageFormatter.html)

Is there any plan for supporting slf4j in future?

Ideally if Azure java functions can support lombook(@Slf4j) as first class citizen , we can annotate function and other classes with @Slf4j and rest of the logging is really easy to follow, rather than deriving Logger from ExecutionContext and passing it everywhere.

Let me know your thoughts.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the ExecutionContext logging entry point and how its Logger is passed into dependency methods. Compare the current java.util.Logger approach with the requested SLF4J and Lombok support. Done would require an agreed integration design and documented scope for future logging support.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.