Announcement Announcement Module
Collapse
No announcement yet.
Wire tap use for logging Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wire tap use for logging

    Hi,

    I have a key as CLIENT_ID in the header of message.

    I want to use a wire tap for logging in such a way that the log file name is same as of the CLIENT_ID. This will allow me to have separate log file for all different CLIENTs.

    Please can you suggest how can I achieve this requirement? Can I use looging-channel-adapter provided implicitly by Spring integration? If yes, how can i define the name of log file? If not, please guide me.

    Many Thanks,
    Jubin

  • #2
    No; the logging-channel adapter uses the underlying logging system (such as log4j). You would need a custom service for this (and invoke it with a <service-activator/>.

    Comment


    • #3
      Can you please guide me though this?

      I am using log4j only. All requirements are same as used by logging-channel adaptor except that I need dynamically provide log file name.

      If i define a custom service for this, can you please provide me class file used by logging-channel-adapter as it will help me in writing the service? Please guide me.

      Many Thanks,
      Jubin

      Comment


      • #4
        No; you can't use logging; the channel adapter code won't help you, it uses the underlying logging subsystem to actually write the data.

        Your custom service would have to do the low-level IO to the file.

        Comment


        • #5
          Ohh. Anyways thanks for giving me direction. I will work to achieve this.

          Many Thanks,
          Jubin

          Comment

          Working...
          X