Skip to content
This repository was archived by the owner on Jul 9, 2022. It is now read-only.

Intscala 55 - logging channel adapter DSL components #17

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

sobychacko
Copy link
Contributor

No description provided.

@ghillert
Copy link
Contributor

Hi @sobychacko,

Could you rebase this PR? It looks like this PR contains some more code for INTSCALA-54. Also, please add one or two tests to org.springframework.integration.dsl. Once that is done, I think I can merge the PR.

Thanks!

@sobychacko
Copy link
Contributor Author

@ghillert PR is rebased and updated with unit test.

* @author Soby Chacko
*
*/
object loggingChannel {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should call this log (like the vert to log ;-)

@ghillert
Copy link
Contributor

I feel the class-name for the logger is not perfect, yet - Instead of LoggingChannelAdapterEndpoint.scala, maybe better call it LoggerEndpointDsl.scala. I believe that aligns better with the rest of the DSL.

@ghillert
Copy link
Contributor

@sobychacko Sorry, did finally some more thinking about it...

I think we also should support the following optional properties:

  • logFullMessage (true | false) (Default: false)
  • logLevel
    • fatal
    • error
    • warn
    • info
    • debug
    • trace

The default log-level shall be info.

  • Furthermore, we should support the logging of SpEL expressions.
  • The logger name shall be optional
    • Internally (Spring Integration) - By default (If not specified) the logger name will be the fully qualified class name of the LoggingHandler implementation

Not sure, yet, what the perfect DSL would look like...

inbound.poll("...").withFixedDelay(100) --> log("org.springintegration.logger")
inbound.poll("...").withFixedDelay(100) --> log
inbound.poll("...").withFixedDelay(100) --> log("org.springintegration.logger").withErrorLevel().logFullMessage(true)
inbound.poll("...").withFixedDelay(100) --> log("org.springintegration.logger").withLogLevel(ERROR).logFullMessage(true)
inbound.poll("...").withFixedDelay(100) --> log().withErrorLevel().logFullMessage(true)

LoggingChannelAdapterEndpoint to LoggerEndpointDsl;
supports log withFullMessage;
supports various log levels;
supports SpEL expressions;
logger name is optional;
adding more unit tests and dsl usage demo's
@sobychacko
Copy link
Contributor Author

@ghillert PR is updated again by incorporating the comments you made. Please take a look and see what you think.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants