Home kellton

Main navigation

  • Services
    • Digital Business Services
      • AI & ML
        • Utilitarian AI
        • Predictive Analytics
        • Generative AI
        • Machine Learning
        • Data Science
        • RPA
      • Digital Experience
        • Product Strategy & Consulting
        • Product Design
        • Product Management
      • Product Engineering
        • Digital Application Development
        • Mobile Engineering
        • IoT & Wearables Solutions
        • Quality Engineering
      • Data & Analytics
        • Data Consulting
        • Data Engineering
        • Data Migration & Modernization
        • Analytics Services
        • Integration & API
      • Cloud Engineering
        • Cloud Consulting
        • Cloud Migration
        • Cloud Managed Services
        • DevSecOps
      • NextGen Services
        • Blockchain
        • Web3
        • Metaverse
        • Digital Signage Solutions
        • Spatial Computing
    • SAP
      • SAP Services
        • S/4HANA Implementations
        • SAP AMS Support
        • SAP Automation
        • SAP Security & GRC
        • SAP Value Added Solutions
        • Other SAP Implementations
      • View All Services
  • Platforms & Products
    • Audit.io
    • Kellton4Health
    • Kellton4NFT
    • Kellton4Commerce
    • KLGAME
    • tHRive
    • Optima
    • Our Data Accelerators
      • Data DigitalTwin
      • SmartScope
      • DataLift
      • SchemaLift
      • Reconcile360
    • View All Products
  • Industries
    • Fintech, Banking, Financial Services & Insurance
    • Retail, E-Commerce & Distribution
    • Pharma, Healthcare & Life Sciences
    • Non-Profit, Government & Education
    • Travel, Logistics & Hospitality
    • HiTech, SaaS, ISV & Communications
    • Manufacturing, Automotive & Chemicals
    • Oil,Gas & Mining
    • Energy & Utilities
    • View All Industries
  • Insights
    • Blogs
    • Brochures
    • Success Stories
    • News / Announcements
    • Webinars
    • White Papers
  • Careers
    • Life At Kellton
    • Jobs
  • About
    • About Us
    • Our Partners
    • Our Leadership
    • Testimonials
    • Analyst Recognitions
    • Investors
    • Privacy-Policy
    • Contact Us
    • Our Delivery Centers
      • India Delivery Center
      • Europe Delivery Center
Search
  1. Home
  2. All Insights
  3. Blogs

Explained: How to Integrate Log4J2 with webMethods?

Product Engineering
Integration & API
May 07 , 2019
Posted By:
Digital Practice Team
linkedin
Log4J2 with webMethods

Other recent blogs

Generative AI companies
ROI of Generative AI: Measuring its impact and value for your business
April 15 , 2025
Data migration cost
Breaking down the cost of Data Migration: Is it worth in 2025
April 10 , 2025
Data Migration trends 2025
Revealing top Data Migration trends and predictions to watch
April 01 , 2025

Let's talk

Reach out, we'd love to hear from you!

Image CAPTCHA
Get new captcha!
Enter the characters shown in the image.

Log4J is a Java-based framework that can be integrated with various platforms and used for custom logging purposes. An upgrade to Log4J with significant improvements, Version 2.x is garbage-free and logs asynchronously using LMAX Disruptor, thereby resulting in low latencies and increased throughput.

Why Log4J?

Log4J is an independent logging mechanism for webMethods environment. Using custom logs, developers find it easier to log the entry/exit point of each service with the request and response XML. These are also helpful in identifying WARN, INFO, FATAL, ERROR, and DEBUG logs.

Integrating Log4J2 with webMethods

Below is the step-by-step guide to performing smooth integration of Log4J2 with webMethods.

Technologies used:

  • webMethods Integration Server 9.X
  • Jog4J2 Package and log4j2.xml file
  • JAR files to place in the Integration Server classpath

Step 1: Install Log4J webMethods Package

Install the Log4J webMethods package in the webMethods Integration Server. You can download it here: Download

Step 2: Define Appenders and Loggers

Edit the "log4j2.xml" file as per your environment and configuration, and place the "log4j2.xml" file in the "...\SoftwareAG\IntegrationServer\instances\default\config" location

The screenshot below shows you the basic environment changes:

1

Log4J provides default Appenders that manage logging of messages to multiple targets. It also provides asynchronous and synchronous loggers.

The user can create custom Appenders and Loggers. If custom Appenders and Loggers are absent in the "log4j2.xml" file, Log4J will automatically provide the default configuration and will log the data to default folder mentioned in the "log4j2.xml" file.

The screenshot below displays the Default Appender and custom demo Appender.
2

3

Step 3: Enable reading of Log4J2.xml through Log4J Wrapper Configurations

Edit the "...\SoftwareAG\profiles\IS_default\configuration\custom_wrapper.conf" file and copy the below settings as shown in the below screenshot:

wrapper.java.additional.204=-Dlog4j.configurationFile=file:///c:/SoftwareAG/IntegrationServer/instances/default/config/log4j2.xml
wrapper.java.additional.205=-DAsyncLogger.RingBufferSize=132000
wrapper.java.additional.206=-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
wrapper.java.additional.302=-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector

4

Step 4: Configure Environment Variables

Edit the "...\SoftwareAG\profiles\IS_default\bin\setenv.bat" file and copy the below settings as shown in the screenshot

SET JAVA_CUSTOM_OPTS=-Dlog4j.configurationFile=file:///c:/SoftwareAG/IntegrationServer/instances/default/config/log4j2.xml -DAsyncLogger.RingBufferSize=132000 -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
 

5

Step 5: Execute Log4J2 JAR Files

Copy the latest "log4j-api-2.8.2.jar," "log4j-core-2.8.2.jar" and "disruptor-3.3.4.jar" (Check for the mentioned JARs in the web for the latest version) files to

"...\SoftwareAG\IntegrationServer\instances\default\packages\Log4j\code\jars" location

6

Step 6: Activate Log4J2 Logging in webMethods

After completing the above five steps, shutdown and start (do not restart option) the Integration Server.

Implement logging by using the Log4J flow services in the "Log4j" package. You can implement custom logging as per your requirements by making changes to the configuration file and using the flow services in the "Log4j" package.

7
Use "Log4j.base.services:logMessage" service for log testing. The flowchart below explains the high-level logic of this wrapper service as implemented by us.

8

The screenshot below shows the data logged into the file at the location specified in the "log4j2.xml" file.

9

Want to know more?

Quantum-proofing your business
Blog
Quantum-proofing your business: A critical security imperative
March 28 , 2025
Minimizing disruption in Product Modernization
Blog
Application Modernization Strategy: Revealing zero-disruption best practices
March 25 , 2025
Adaptive software development guide - Abstract thumbnail image
Blog
A detailed guide on adaptive software development
March 12 , 2025

North America: +1.844.469.8900

Asia: +91.124.469.8900

Europe: +44.203.807.6911

Email: ask@kellton.com

Footer menu right

  • Services
  • Platforms & Products
  • Industries
  • Insights

Footer Menu Left

  • About
  • News
  • Careers
  • Contact
LinkedIn Twitter Youtube
clutch Badge

© 2024 Kellton