There is incorrect logging library usage - loggers are created for random names
Description
The loggers are supposed to be created per class or per other static entity.
Right now Nakadi is creating loggers for random names.
Logging libraries to not have an ability to remove loggers by names that are not in use anymore, and effectively this may result in OOM after some time.
This PR replaces the way how the subscription id, stream id and flow Id are passed and used in logging purposes.
Nakadi usage of NDC is replaces with usage of MDC
Subscription id and stream id are migrated to MDC instead of logger name
A special filter for logger records is added to print only subscription ids we are interested in.
One-line summary
There is incorrect logging library usage - loggers are created for random names
Description
The loggers are supposed to be created per class or per other static entity. Right now Nakadi is creating loggers for random names. Logging libraries to not have an ability to remove loggers by names that are not in use anymore, and effectively this may result in OOM after some time.
This PR replaces the way how the subscription id, stream id and flow Id are passed and used in logging purposes.
Deployment Notes
Logging configuration should be reworked