Giter Site home page Giter Site logo

mp-mule-logger's Introduction

Mplog - custom logger for Mule ESB

Mule supported versions

Mule 3.7.3

Installation

  • Checkout the repo
  • Run mvn install
  • Add this dependency to the application pom.xml file:
<dependency>
    <groupId>com.myplay.mule.connectors</groupId>
    <artifactId>mplog</artifactId>
    <version>1.0.0</version>
</dependency>

Usage example

Add the namespace an the schema location to the root element of your config:

<mule xmlns:mplog="http://www.mulesoft.org/schema/mule/mplog"
    ...
    xsi:schemaLocation="... http://www.mulesoft.org/schema/mule/mplog http://www.mulesoft.org/schema/mule/mplog/current/mule-mplog.xsd">

Now you can log using this elements:

<mplog:log level="INFO" message="Optional message" doc:name="Logging">
    <mplog:entry>
        <mplog:entry key="query" value-ref="#[message.inboundProperties['http.query.params']['query']]" />
        <mplog:entry key="payload" value-ref="#[payload]" />
    </mplog:entry>
</mplog:log>

It logs

INFO  2016-02-29 11:18:41,188 [[app].HTTP_Listener_Configuration.worker.01] com.myplay.esb.connectors.mplog.MplogConnector: Optional message message_id="18b00110-df00-11e5-b49c-985aebd2b5df" flow="esb-flow" query="one" payload="{\"one\": \"1\", \"two\": \"2\"}"

mp-mule-logger's People

Contributors

vadimr avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

vadimr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.