- Change package from
com.tersesystems.echopraxia
toechopraxia
. - Move logging specific API (Conditions, LoggingContext) to
echopraxia.logging.api
so that only fields, values, attributes are coreechopraxia.api
. - Break out JSONPath dependency (requires SLF4J 2.x, awkward for Log4J2 and JUL frameworks)
- Add
JsonPathCondition.pathCondition
so that JSON path functionality is still available. - Add a
simple
logger that does not use field builder functions or conditions. - Remove
async
,fluent
, andsemantic
modules from codebase (they are best done at user level) - Remove
asyncLog
methods from core loggers (this is better done at a user level). - Update logstash encoder dependency to 8.0, logback dependency to 1.5.x (requires SLF4J 2.x)
- Add dependency on jsonpath for
scripting
module. - Remove deprecated methods on field attributes.
- Fix a bug where
toStringValue
was not correctly applied toValue.object
orValue.array
.
- Add value attributes,
value.attributes()
etc. - Make
abbreviateAfter
,asCardinal
methods onStringValue
andArrayValue
, deprecate the field methods. - Add
withToStringValue
toValue
so thattoStringFormat
doesn't have to be used (FieldVisitor is too complex). - Add
(Field...)
method signatures to Logger so that you can log arguments without using field builder function. - Add "no message" method signatures, so you don't need an explicit string template.
- Fix bug in ToStringFormat attribute where child fields were not processed correctly.
- Add a no-op EchopraxiaService provider, for use in tests.
- Add
withToStringFormat
to PresentationField.
- Make the
slf4j-api
dependency infilewatch
andjul
modules be "compileOnly"
- Move
LoggingContext
fromspi
back to the api package.
- Make Logback and logstash-logback-encoder dependencies be compile only for Logback 1.3/1.4 and LLE 7.4
- Remove lower bound for
*Logger<F extends FieldBuilder>
, now justLogger<F>
so you can use your own builder. - Move internal classes in
api
intospi
package - Move from very large README.md to documentation website
- Add presentation hints
valueOnly
,abbreviateAfter
,displayName
,elide
,cardinal
- Add
PresentationHintsAware
andPresentationField
so we can dofield.abbreviateAfter(5)
- Add
FieldCreator
and service implementations so Field can be extended with extra methods - Add
ToStringFormatter
and wirefield.toString
andvalue.toString
to it - Add
FieldVisitor
for changing field structure in JSON - Add exception handler tied to
EchopraxiaService
- Add
EchopraxiaServiceProvider
andEchopraxiaService
for centralized management - Change
equals
on fields so that fields are not equal if they have different attributes - Make all fields (
fb.string
,fb.number
,fb.nullValue
) usekeyValue
by default. - Add field attributes.
- Move logback converters to logback module by @wsargent in #242
- Add fallback logic for logstash by @wsargent in #241
- Add JUL options for context by @wsargent in #250
- Remove FieldBuilder as a dependency of DiffFieldBuilder by @wsargent in #251
- Open logstash context by @wsargent in #252
- Add
getCore()
method toLoggingContext
in #229 - Add user defined functions to scripting to expose impure methods and context to Tweakflow in #227
- Path based logback custom converters in #223
- Add delegate core logger in #226
- Remove AsyncLogger from README (too confusing, not needed for most people)
- Move
LogbackLoggingContext
to Logback module
- Delay logback initialization.
- Allow filters to be instantiated from a context classloader.
- More Logback direct API support with
ConditionTurboFilter
- Break out the underlying Logback classes from Logstash, so that "direct access" can be used as a fallback.
- Fix a bug in JSON exception rendering using Logstash
StructuredArgument
where exception was being rendered a full nested JSON object.
- Added Condition.booleanMatch/objectMatch/*match for better direct matching.
- Added a type safe Values.equals static method.
- Also opened up the Logstash / Log4J constructors, so that it's easier to wrap Logback Logger / ExtendedLogger directly into a core logger.
Break out Jackson serde module and make both Logstash and Log4J2 implementations depend on it.
- Break out jackson module as a distinct dependency.
- Upgrade to Log4J2 2.18.0
Changes to CoreLogger
API to allow for more flexible loggers in echopraxia-plusscala. Some optimizations.
- Add
extraFields
parameter toCoreLogger
methods. #201 - Document "call-by-name" semantics on
logger.withFields
. #188 - Expose
getArgumentFields()
andgetLoggerFields()
methods onLoggingContext
. #197 - Upgrade logstash-logback-encoder to 7.2 #203
- Add
coreLogger.logHandle
for loggers that may log multiple times internally when called. #202 - Fix a bug where
withFields
was being memoized and evaluated once. #187
Bug fixes and some enhancements around number values.
ctx.findList
returns a list with a single element if an element matches, i.e.ctx.findList("$.exception")
returns a list containing a singleThrowable
.- Add object equality methods for
Value
andField
instances. - Add
Comparable
interface forNumberValue
and specialize types so thatNumberValue<Integer>
andNumberValue<Byte>
are not comparable. - Set null numbers to return
0
rather thannull
to better reflect java number behavior. - Remove generic
Numeric
methods, use specific numbers in methods. - Add cache for number values corresponding to the java.lang number caches.
The API package now begins with the package name com.tersesystems.echopraxia.api
and does not contain the Logger
or LoggerFactory
classes. All the classes in core
and support
have been moved to api
.
There is a new FieldBuilderResult
interface that is responsible for getting fields from a field builder. The Field.BuilderFunction
interface which extended Function<FB, List<Field>>
has been replaced with plain Function<FB, FieldBuilderResult>
. The Field
interface now extends FieldBuilderResult
. The upshot of this is that both fb.list
and field
return a FieldBuilderResult
and there is no more need for fb.only
. A FieldBuilderWithOnly
interface is available for backwards compatibility. FieldBuilderResult.list
will take most aggregate forms; Stream
, Iterator
, etc.
The Field.Builder
interface is now FieldBuilder
.
The Field.Value
interface and subclasses have been moved to a top level class Value
, i.e. Value.string("foo")
rather than Field.Value.string("foo")
.
There is a FieldConstants
class that uses a resource bundle to load in hardcoded field constants, such as exception
and stackTrace
. Use FieldConstants.EXCEPTION
to reference.
The core logger no longer depends on FB extends FieldBuilder
, so it is now possible to create custom loggers that don't expose fb.keyValue
or fb.string
.
There is a new Utilities.threadContext()
method which is a cleaner way to manage thread context in custom loggers.
Jayway specific predicates removed from LoggingContext
API.
Logger has been broken out into a different maven package. It is still in the same location com.tersesystems.echopraxia.Logger
.
The withExecutor
method that returned AsyncLogger
has been removed.
The withFieldBuilder(Foo.class)
method has been removed, please use withFieldBuilder(new Foo)
instead.
The async logger has been broken out into a different maven package. It is still in the same location com.tersesystems.echopraxia.async.AsyncLogger
.
The withFieldBuilder(Foo.class)
method has been removed, please use withFieldBuilder(new Foo)
instead.
The argument
method now takes Function<FB, FieldBuilderResult>
and so will work with both lists and single fields.
The withFieldBuilder(Foo.class)
method has been removed, please use withFieldBuilder(new Foo)
instead.
The withFieldBuilder(Foo.class)
method has been removed, please use withFieldBuilder(new Foo)
instead.
No major changes. Minor optimizations internally to reduce allocation, enable more inlining, and pre-size lists.
The Log4JCoreLogger
logging checks were using logger.isEnabled(log4jLevel, marker, message, e)
which required resolution of the field builder function even on logging levels that were disabled, just in case some filters might evaluate on message or exception. This is an unjustifiable overhead, and now Log4J checks the same way as Logstash with logger.isEnabled(log4jLevel, marker)
using only the level and marker as parameters -- only if that check is passed are arguments evaluated.
No major changes. Tweakflow script evaluation has been optimized and run through benchmarking to minimize object allocation and maximize JVM inlining.