Provide a way to customize default `serviceName` in RequestLog
See original GitHub issueThe default serviceName of a service is an FQCN of the innermost class.
And a serviceName could get overridden by ctx.logBuilder().name(serviceName, methodName).
Sometimes, users want to globally change the serviceName convention to a simple name of the innermost class.
We might provide an option to ServerBuilder such as:
Server.builder()
.serviceNaming(serviceName -> {
var lastDotIndex = serviceName.lastIndexOf('.');
if (lastDotIndex > -1) {
return serviceName.substring(lastDotIndex, serviceName.length());
}
...
});
And we can also provide a built-in abbreviation algorithm like logback’s Conversion Word.
ServiceNameRule.shorten(15);
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Logging - JFrog Documentation
Main service log file for each microservice, containing data on the service activity. Request Log. <service-name>-request.log. For example: ...
Read more >Dropwizard Configuration Reference
By default, the timestamp is not formatted. To customize how timestamps are formatted, set the property to the corresponding DateTimeFormatter string or one...
Read more >Schema Registry Configuration Options
The advertised host name. Make sure to set this if running Schema Registry with multiple nodes. Type: string; Default: “192.168.50.1”; Importance: high.
Read more >Logging and viewing logs | Cloud Run Documentation
This page describes the logs available when using Cloud Run, and how to view and write logs. Cloud Run has two types of...
Read more >Logger - AWS Lambda Powertools for Python
Logging level, Sets how verbose Logger should be (INFO, by default), LOG_LEVEL, level. Service, Sets service key that will be present across all...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Can we close this issue? @ikhoon
I see. It seems that I unnecessarily worried layered
serviceNaming. Agreed that the suggestion makes the problem simple and reduce confusion. Let me try with that way. Thanks. 😃