Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate support for Logback Layout #638

Open
brenuart opened this issue Sep 8, 2021 · 2 comments
Open

Deprecate support for Logback Layout #638

brenuart opened this issue Sep 8, 2021 · 2 comments
Labels
warn/deprecation Changes about to deprecate feature/methods/fields

Comments

@brenuart
Copy link
Collaborator

brenuart commented Sep 8, 2021

Logback has deprecated the use of Layout in favour of Encoder. A LayoutWrappingEncoder adapter is provided to bridge between the two.

Logback OutputStreamAppender and sub-classes like ConsoleAppender still accept a Layout but wrap them with a LayoutWrappingEncoder and emit warnings saying:

This appender no longer admits a layout as a sub-component, set an encoder instead.
To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details.

The SyslogAppender however is still using a Layout but does not allow to set it by configuration.

Supporting Layout in logstash-logback-encoder is cumbersome and increase code complexity for little to no benefit. Proposition is to deprecate it for removal in the next major release.

@philsttr
Copy link
Collaborator

philsttr commented Sep 9, 2021

The SyslogAppender however is still using a Layout but does not allow to set it by configuration.

AbstractLogstashUdpSocketAppender extends SyslogAppenderBase, and allows the layout to be configured. It's typically configured with a Layout from logstash-logback-encoder.

If layout support is removed from logstash-logback-encoder, we'll need to copy the logic from SyslogAppenderBase into AbstractLogstashUdpSocketAppender

@brenuart
Copy link
Collaborator Author

brenuart commented Sep 9, 2021

AbstractLogstashUdpSocketAppender extends SyslogAppenderBase...

Correct. We should definitely see how we can make the UdpSocketAppender use an Encoder (or else) before deprecating Layouts...

@brenuart brenuart added the warn/deprecation Changes about to deprecate feature/methods/fields label Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
warn/deprecation Changes about to deprecate feature/methods/fields
Projects
None yet
Development

No branches or pull requests

2 participants