Package sk.antons.siutils.log
Class SlfHandler
java.lang.Object
sk.antons.siutils.handler.MessageConsumer
sk.antons.siutils.log.SlfHandler
- All Implemented Interfaces:
org.springframework.integration.handler.MessageProcessor<org.springframework.messaging.Message<?>>
API for logging in flows. It uses given slf4j logger instance so it is
possible to configure logging more effective way.
use form:
.handler(SlfHandler.of(lg -> lg.debug(log, "message {}", lg.message())))
- Author:
- antons
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaccept(org.springframework.messaging.Message<?> message) Process message data.static SlfHandlerof(Function<SlfHandler.Lg, SlfHandler.Lg> lgfunction) Methods inherited from class sk.antons.siutils.handler.MessageConsumer
processMessage
-
Constructor Details
-
SlfHandler
-
-
Method Details
-
accept
protected void accept(org.springframework.messaging.Message<?> message) throws org.springframework.messaging.MessagingException Description copied from class:MessageConsumerProcess message data. (Call an service or whatever....)- Specified by:
acceptin classMessageConsumer- Throws:
org.springframework.messaging.MessagingException
-
of
-