Releases: logfellow/logstash-logback-encoder
logstash-logback-encoder-6.4
Enhancements
- #386 Remove volatile read/write for deferred markers (@PascalSchumacher)
- #387 Provided better error message when dynamically loading jackson modules fails (@philsttr)
- #393 Added includeContext support for access events (@kersten)
- #394 Replace
Charset.forName("UTF-8")
withStandardCharsets.UTF_8
(@ArthurGazizov) - #395 Add new json provider to log root stack trace elements (@worldtiki)
- #396 Added
defer
support for StructuredArguments (@philsttr) - #403 Added support for renaming MDC fields (@philsttr)
- #404/#413 Add option to split log messages on newlines (@metacubed)
Bug fixes
- #384 Add missing String#format argument (@PascalSchumacher)
- #385 Add missing space in error status message (@PascalSchumacher)
Documentation Updates
- #401 Fix error in the regex capturing groups example (@saltos)
- #405 Clarify structured argument code for standardized field names (@philsttr)
- #411 Fix typo in readme (@robsonbittencourt)
Dependency Updates
Usage | Dependency | Old Version | New Version |
---|---|---|---|
Runtime | jackson | 2.10.1 | 2.11.0 |
Runtime | uuid-generator | 3.2.0 | 4.0.1 |
Runtime (shaded) | commons-lang3 | 3.9 | 3.10 |
Compile-time | maven-source-plugin | 3.2.0 | 3.2.1 |
Compile-time | maven-javadoc-plugin | 3.1.1 | 3.2.0 |
Compile-time | maven-shade-plugin | 3.2.1 | 3.2.3 |
Test-time | junit | 4.12 | 4.13 |
Test-time | assertj | 3.14.0 | 3.16.1 |
Test-time | mockito | 3.2.0 | 3.3.3 |
logstash-logback-encoder-6.3
Enhancements
- #378 / #382 Masking support (with inspiration from @rusucosmin)
- #363 jackson upgrades (@sdudzin )
- #374 Added support for a line separator in
CompositeJsonLayout
(defaults to no line separator for backwards compitability, but can now be configured with a line separator likeCompositeJsonEncoder
) - #380 Set
Automatic-Module-Name
tologstash.logback.encoder
inMANIFEST.MF
- #379 Switch from travis ci to github actions (releases are now automated!)
- Switch from
oss-parent
tonexus-staging-maven-plugin
- Use
mvnw
for building
- Switch from
- Added issue templates
Documentation Updates
- #376 typo fix (@KangSungBum)
- Misc
README.md
improvements
Dependency Updates
Usage | Dependency | Old Version | New Version |
---|---|---|---|
Runtime | jackson | 2.9.9.20190807 | 2.10.1 |
Compile-time | maven-jar-plugin | 3.1.2 | 3.2.0 |
Compile-time | maven-source-plugin | 3.1.0 | 3.2.0 |
Compile-time | maven-javadoc-plugin | 3.0.0 | 3.1.1 |
Compile-time | maven-gpg-plugin | n/a | 1.6 |
Compile-time | nexus-staging-maven-plugin | n/a | 1.6.8 |
Test-time | assertj | 3.13.2 | 3.14.0 |
Test-time | mockito | 2.28.2 | 3.2.0 |
logstash-logback-encoder-6.2
Enhancements
- #341 Pro-actively reopen the connection when the socket reader detects the connection has been closed instead of waiting for the next event
- #343 Introduce
writeTimeout
to detect stuck TCP write operations, and reopen the connection - #344 Add
getConnectionDestination()
to TCP appenders to provide visibility into the currently connected destination - #346 Async appenders now flush delegate OutputStreamAppenders at the end of each batch
- #353 Don't block trying to publish a keep alive event if the ring buffer is full.
- #357 Include all public packages from logstash-logback-encoder in OSGi Exported-Packages in manifest
- #359 Update jackson-bom to 2.9.9.20190807, which updates jackson-databind to 2.9.9.3 to fix some deserialization security vulnerabilities (logstash-logback-encoder was not affected, since it does not deserialize JSON data) (@kubukoz)
Documentation Updates
- #342 Clarified advantages/disadvantages of disabling write buffer
- #345 Add required downcast in
JsonFactoryDecorator
example - #348 Mention in documentation that ShortenedThrowableConverter only applies to Throwables logged as extra arguments (e.g. not structured arguments or markers)
- #358 Fixed xml tag in example (@agentgonzo)
Dependency Updates
Usage | Dependency | Old Version | New Version |
---|---|---|---|
Runtime | jackson | 2.9.9 | 2.9.9.20190807 |
Compile-time | maven-bundle-plugin | 4.2.0 | 4.2.1 |
Test-time | mockito | 2.27.0 | 2.28.2 |
Test-time | assertj | 2.9.1 | 3.13.2 |
logstash-logback-encoder-6.1
- #338 Deferred markers (
Markers.defer(...)
) are now memoized, so the same value is used when encoding for all appenders - #339 The default status listener registered by async appenders changed from logback's
OnConsoleStatusListener
to a custom status listener that only outputs warn/error status messages to standard out - #340 Marker references are now included when
%marker
is used in patterns
logstash-logback-encoder-6.0
Overview
Version 6.0 is a major release with several new features and bugfixes.
Several backwards incompatibilities were introduced (see section below). Most have the ability to revert to previous behavior via config changes if necessary.
Support for Java 1.7 has been removed. Java 1.8 or above is now required.
New Features
- #80 Add UDP appender that can use any layout (
LogstashUdpSocketAppender
)
Add UDP appender for AccessEvents (LogstashAccessUdpSocketAppender
)
DeprecateLogstashSocketAppender
in favor ofLogstashUdpSocketAppender
- #127 Added
FailureSummaryLoggingAppenderListener
for logging a message after the first successfully logged event after a series of failures - #132 Auto-add console status listener in async appenders, so that errors are visible by default
- #193 Avoid reconnection storm by reworking how
reconnectionDelay
works, and introducingPreferPrimaryDestinationConnectionStrategy.minConnectionTimeBeforePrimary
- #201 Add ability for the pattern provider to omit fields whose values are empty (
omitEmptyFields
) - #274 Support non-JSON output in other Jackson dataformats (e.g. Smile, CBOR, YAML) via decorators
- #326 Support adding additional providers to
LogstashAccessEncoder
- #327 / #328 (@brenuart) Trigger ssl handshake on connection establishment, to catch ssl handshake failures early
- #330 (@brenuart) minor coding optimizations
- #334 Support deferred Markers
- #335 Support Marker aggregation and empty markers
Bug fixes
- #336 Add newline at end of stacktrace truncated due to
maxLength
- #322 (@bwaldvogel) Fix typo in stack hash doc
Dependency version changes
Usage | Dependency | Old Version | New Version |
---|---|---|---|
Runtime | jackson | 2.9.8 | 2.9.9 |
Runtime | uuid-generator | 3.1.5 | 3.2.0 |
Runtime (shaded) | commons-lang | 2.6 | n/a |
Runtime (shaded) | commons-lang3 | n/a | 3.9 |
Compile-time | animal-sniffer | 1.17 | 1.18 |
Test-time | mockito | 2.23.4 | 2.27.0 |
Test-time | commons-io | 2.6 | n/a |
Backwards Incompatibilities
-
Support for Java 1.7 has been removed. Java 1.8 or above is now required.
-
For #80,
LogstashSocketAppender
has been deprecated in favor ofLogstashUdpSocketAppender
with aLogstashLayout
-
For #132, the async appenders (including the tcp appenders) will now add a logback
OnConsoleStatusListener
if no status listener has been registered. This provides a better out-of-the-box experience by ensuring error status messages are visible on the console by default.
The automatic registering can be disabled by either registering a different logback status listener or by settingaddDefaultStatusListener
tofalse
on the appender. -
For #193, The
preferPrimary
connection strategy will now by default ensure a connection has been open for at least 10 seconds before preferring primary again.
If a connection has been open less than 10 seconds, other secondary destinations will be attempted before trying primary again.
To revert to the old behavior of always preferring primary, specify0 seconds
for theminConnectionTimeBeforePrimary
as documented here -
For #274, to support non-JSON output, a new
default JsonFactory decorate(JsonFactory factory)
method has been added to theJsonFactoryDecorator
interface.
The oldMappingJsonFactory decorate(MappingJsonFactory factory)
method has been made adefault
method, and has been deprecated.
The new method is the preferred method of the interface. The old method will be removed in a future release.
Any customJsonFactoryDecorator
implementations should change their implementation to the new method.
logstash-logback-encoder-5.3
- #307 Add support for excluding markers via
<includeTags>false</includeTags>
(@ramsperger) - #311 Provide a way to access the fieldValue of SingleFieldAppendingMarker
- #315 Allow Jackson ObjectMapper to scan for available modules on the classpath
- #306 Remove usage of powermock
- Updated license files so ASL 2.0 can be properly detected by github
- Added warning to readme about prefix/suffix not working due to LOGBACK-1326 and logback PR#383
Upgrade Notes
- As part of #315, logstash-logback-encoder will configure jackson to dynamically scan and find jackson modules available on the classpath. See Registering Jackson Modules for more info.
- The
Logback11Support
class methods were changed from static methods to instance methods to allow for easier unit test mocking. Since this is an internal class, it should not affect end users
Dependency version changes
Usage | Dependency | Old Version | New Version |
---|---|---|---|
Runtime | jackson | 2.9.6 | 2.9.8 |
Compile-time | maven-compiler-plugin | 2.3.2 | 3.8.0 |
Test-time | mockito | 2.9.0 | 2.23.4 |
Test-time | powermock | 1.7.3 | removed |
logstash-logback-encoder-5.2
- #288 / #289 Move
logback-core
toprovided
scope (@yborovikov) - #295 Fix
#tryJson
when messages start with a number - #299
- Allow
SleepingWaitStrategy
'sretries
andparkTimeNs
to be configured - Added warning to README about CPU utilization of
SleepingWaitStrategy
. - added support for
LiteTimeoutBlockingWaitStrategy
- Allow
- #294 Don't fill in stack trace in test exception (affects unit test only) (@kampka)
Dependency version changes
Usage | Dependency | Old Version | New Version |
---|---|---|---|
Runtime | jackson | 2.9.5 | 2.9.6 |
Runtime | uuid | 3.1.4 | 3.1.5 |
Runtime (shaded) | disruptor | 3.3.8 | 3.4.2 |
Compile-time | animal-sniffer | 1.16 | 1.17 |
Test-time | assertj | 2.9.0 | 2.9.1 |
Additionally, logback-core
dependency scope was changed from compile
to provided
(#288), and a note was added to the readme indicating that projects that use logstash-logback-encoder must also directly depend on either logback-classic
or logback-access
, which both transitively depend on logback-core
logstash-logback-encoder-5.1
- #286 Add ability to output timestamp value as unix timestamps (number or string) (@peterjurkovic)
- #279 / #285 Add ability to customize character escape codes (@fred84)
- #283 Added more packages to OSGI exports (@redvasily)
- #284 Update Jackson verson to 2.9.5 (@msymons)
- #282 Fix bug that prevented configuring request header filters from logback xml
- #276 Fix bug that prevented using global custom field provider within nested provider
logstash-logback-encoder-5.0
Overview
Version 5.0 is a major release with several new features and bugfixes.
Several backwards incompatibilities were introduced (see section below). Most have the ability to revert to previous behavior via config changes if necessary.
Support for Java 1.6 has been removed. Java 1.7 or above is now required.
New Features
- Added Appender Listeners so that applications can receive notifications for the appender lifecycle and event processing. In the future, listeners can be added to implement metrics (#126 ) or customized error handling/reporting (#159, #127). Applications can also provide their own listeners.
- #194 Added Header Filters for deciding which request/response headers to include in access events
- #251 Added a
#tryJson
pattern operation to fall back to just printing the message if the argument is not valid JSON - #258 Added a
timestampPattern
configuration property toLogstashEncoder
,LogstashLayout
,LogstashAccessEncoder
, andLogstashAccessLayout
- Added
CompositeJsonFactoryDecorator
andCompositeJsonGeneratorDecorator
to make it easier to add multiple decorators. - #257 @jackhammer2k Added new
throwableClassName
andthrowableRootCauseClassName
JSON providers
Bug fixes / Minor improvements
- #241 Fixed the
pattern
JsonProvider to be able to be used within thenestedField
JsonProvider - #237 Fixed setting the buffer initial capacity of the
ShortenedThrowableConverter
- #243 Documented using
dependencyManagment
to sync logback dependency versions - #259 Upgraded jackson dependencies to 2.9.4 as mentioned in dependency version changes below (@haus contributed to this update)
com.fasterxml.uuid:java-uuid-generator
is no longer included in the logstash-logback-encoder jar, and is now an optional dependency- #240 @robsonbittencourt Fixed anchors in README.md
Dependency version changes
Usage | Dependency | Old Version | New Version |
---|---|---|---|
Runtime | jackson | 2.8.9 | 2.9.4 |
Runtime (shaded) | disruptor | 3.3.4 | 3.3.8 |
Compile-time | animal-sniffer | 1.15 | 1.16 |
Test-time | assertj | 2.4.0 | 2.9.0 |
Test-time | mockito | 1.10.19 | 2.9.0 |
Test-time | powermock | 1.6.5 | 1.7.3 |
Test-time | commons-io | 2.4 | 2.6 |
Backwards Incompatibilities
-
Support for Java 1.6 has been removed. Java 1.7 or above is now required.
-
For #112, the default
maxDepthPerThrowable
of theShortenedThrowableConverter
has been changed to be full/unlimited to be be better aligned with its other configuration parameters.To revert to the old value, specify
25
for themaxDepthPerThrowable
as documented here -
For #138 and #150, access event field names have been changed.
Old field name New field name @fields.content_length
content_length
@fields.elapsed_time
elapsed_time
@fields.method
method
@fields.protocol
protocol
@fields.requested_url
requested_url
@fields.requested_uri
requested_uri
@fields.remote_host
remote_host
@fields.remote_user
remote_user
@fields.status_code
status_code
@fields.HOSTNAME
n/a @message
message
To revert to the old field names, specify the following in the encoder/layout configuration:
<fieldNames class="net.logstash.logback.fieldnames.Pre50LogstashAccessFieldNames"/>
-
For #176, the
@fields.hostname
field has been removed. It's value was always the same as the@fields.remoteHost
field value (which is now theremoteHost
field) -
For #169, the
arguments
JSON provider has been enabled by default in theLogstashEncoder
,LogstashLayout
,LogstashAccessEncoder
, andLogstashAccessLayout
To disable the arguments provider, specify the following in the encoder/layout configuration:
<includeStructuredArguments>false</includeStructuredArguments>
-
For #174, the default field type of the
@version
field has changed from an integer to a string.To change the
@version
field type back to an integer, specify the following in the encoder/layout configuration:<writeVersionAsInteger>true</writeVersionAsInteger>
or, if you are using the
version
provider directly, specify the following in theversion
provider configuration:<writeAsInteger>true</writeAsInteger>
-
For #261
ESCAPE_NON_ASCII
is now disabled by defaultTo reenable it, you can use the
EscapeNonAsciiJsonFactoryDecorator
by specifying the following in the encoder/layout configuration:<jsonFactoryDecorator class="net.logstash.logback.decorate.EscapeNonAsciiJsonFactoryDecorator"/>
If you were already using a jsonFactoryDecorator, you can use the new
CompositeJsonFactoryDecorator
to add multiple JsonFactoryDecorators -
Request/response header names are now written in lowercase by default
To revert to the original behavior, specify the following in the encoder/layout/provider configuration:
<lowerCaseHeaderNames>false</lowerCaseHeaderNames>