SlideShare a Scribd company logo
1 of 13
MULE
LOGGING
BY POLAKI SAIRAM
Mule Logger
– We use the Logger component to log messages such as error messages, status
notifications, or exceptions.
– We can add a logger anywhere in a flow, and you can configure it to log
anything: any string, any Mule expression, or any combination of strings and
Mule expressions.
– We can log 5 different levels of log messages in mule. They are ERROR, WARN,
INFO, DEBUG and TRACE. The default level is INFO.
Logger - Example
Logger - Example
Logger - Example
INFO 2017-06-23 11:45:12,276 [[logger1].HTTP_Listener_Configuration.worker.01]
org.mule.api.processor.LoggerMessageProcessor: This is INFO message
Logger - Example
ERROR 2017-06-23 11:50:04,295 [[logger1].HTTP_Listener_Configuration.worker.01]
org.mule.api.processor.LoggerMessageProcessor: This is ERROR message
Logger - Example
ERROR 2017-06-23 11:50:04,295 [[logger1].HTTP_Listener_Configuration.worker.01]
org.mule.api.processor.LoggerMessageProcessor: This is ERROR message
Logger - Example
Observe that DEBUG level logs are not logged in console. This is due to we are using default log4j2
configuration which logs messages of level greater than equal to INFO and DEBUG’s level is lesser than INFO.
LOG4J2.XML File
LOG4J2.XML File
Customization
Change “org.mule” classes level to DEBUG and trigger the DEBUG request.
Observe that many DEBUG logs are logged during the start of application.
LOG4J2.XML File
Customization
Another way to log this particular message is by changing http logger level to
DEBUG.
Configuring Custom Logging
Settings
– To configure custom logging settings at server level change
$MULE_HOME/conf/log4j2.xml file.
– In Anypoint Studio, log4j2.xml appears in the src/main/resources path.
– To use custom logging settings file sepeicfy log.configFile to log-settings-
file.xml(someFileName) in mule-deploy.properties. The path to log-settings-
file.xml can be either relative to working directory or an absolute path.
Configuring Custom Logging
Settings
– If this deployment property isn’t set, when an application is deployed, Mule
looks for a config file following a child-first pattern, as listed below:
i. Look for a file called log4j2-test.xml in the application classpath
ii. Look for a file called log4j2.xml in the application classpath
iii. Look for a file called log4j2-test.xml in the domain classpath
iv. Look for a file called log4j2.xml in the domain classpath
v. Look for a file called log4j2-test.xml in MULE_HOME/conf
vi. Look for a file called log4j2.xml in MULE_HOME/conf
vii. Apply default configuration.

More Related Content

What's hot

Mule security - spring security manager
Mule  security - spring security managerMule  security - spring security manager
Mule security - spring security managerD.Rajesh Kumar
 
R12 d49656 gc10-apps dba 13
R12 d49656 gc10-apps dba 13R12 d49656 gc10-apps dba 13
R12 d49656 gc10-apps dba 13zeesniper
 
R12 d49656 gc10-apps dba 12
R12 d49656 gc10-apps dba 12R12 d49656 gc10-apps dba 12
R12 d49656 gc10-apps dba 12zeesniper
 
Apache lb
Apache lbApache lb
Apache lbKsd Che
 
Less02 Installation
Less02 InstallationLess02 Installation
Less02 Installationvivaankumar
 
R12 d49656 gc10-apps dba 27
R12 d49656 gc10-apps dba 27R12 d49656 gc10-apps dba 27
R12 d49656 gc10-apps dba 27zeesniper
 
Mule security - ldap for spring security
Mule  security - ldap for spring securityMule  security - ldap for spring security
Mule security - ldap for spring securityD.Rajesh Kumar
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in muleSon Nguyen
 
R12 d49656 gc10-apps dba 26
R12 d49656 gc10-apps dba 26R12 d49656 gc10-apps dba 26
R12 d49656 gc10-apps dba 26zeesniper
 
Mule with drools
Mule with droolsMule with drools
Mule with droolsF K
 
Mule with drools
Mule with droolsMule with drools
Mule with droolsKhan625
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in muleKhan625
 

What's hot (18)

Mule security - spring security manager
Mule  security - spring security managerMule  security - spring security manager
Mule security - spring security manager
 
R12 d49656 gc10-apps dba 13
R12 d49656 gc10-apps dba 13R12 d49656 gc10-apps dba 13
R12 d49656 gc10-apps dba 13
 
Less16 Recovery
Less16 RecoveryLess16 Recovery
Less16 Recovery
 
R12 d49656 gc10-apps dba 12
R12 d49656 gc10-apps dba 12R12 d49656 gc10-apps dba 12
R12 d49656 gc10-apps dba 12
 
Apache lb
Apache lbApache lb
Apache lb
 
Less15 Backups
Less15 BackupsLess15 Backups
Less15 Backups
 
Mule security - saml
Mule  security - samlMule  security - saml
Mule security - saml
 
Less02 Installation
Less02 InstallationLess02 Installation
Less02 Installation
 
R12 d49656 gc10-apps dba 27
R12 d49656 gc10-apps dba 27R12 d49656 gc10-apps dba 27
R12 d49656 gc10-apps dba 27
 
Mule security - ldap for spring security
Mule  security - ldap for spring securityMule  security - ldap for spring security
Mule security - ldap for spring security
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
R12 d49656 gc10-apps dba 26
R12 d49656 gc10-apps dba 26R12 d49656 gc10-apps dba 26
R12 d49656 gc10-apps dba 26
 
Mule with drools
Mule with droolsMule with drools
Mule with drools
 
Mule security
Mule securityMule security
Mule security
 
Mule introduction
Mule introductionMule introduction
Mule introduction
 
Mule with drools
Mule with droolsMule with drools
Mule with drools
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 

Similar to Mule custom logging

Logging configuration in mule
Logging configuration in muleLogging configuration in mule
Logging configuration in muleSon Nguyen
 
Mule debugging logging_configuration_in_mule
Mule debugging logging_configuration_in_muleMule debugging logging_configuration_in_mule
Mule debugging logging_configuration_in_mulekunal vishe
 
Logging from the bottom up
Logging from the bottom upLogging from the bottom up
Logging from the bottom upFrancis Edwards
 
The cPanel Log Files
The cPanel Log FilesThe cPanel Log Files
The cPanel Log FilesHTS Hosting
 
Trouble shoot with linux syslog
Trouble shoot with linux syslogTrouble shoot with linux syslog
Trouble shoot with linux syslogashok191
 
Logging Services for .net - log4net
Logging Services for .net - log4netLogging Services for .net - log4net
Logging Services for .net - log4netGuo Albert
 
Oracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise ApplicationsOracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise Applicationsglynnfoster
 
Logging best practice in mule using logger component
Logging best practice in mule using logger componentLogging best practice in mule using logger component
Logging best practice in mule using logger componentGovind Mulinti
 
Prodigyview XML COnfiguration File
Prodigyview XML COnfiguration FileProdigyview XML COnfiguration File
Prodigyview XML COnfiguration FileProdigyView
 
West Yorkshire Meetup #4
West Yorkshire Meetup #4West Yorkshire Meetup #4
West Yorkshire Meetup #4Francis Edwards
 
Logging with Logback in Scala
Logging with Logback in ScalaLogging with Logback in Scala
Logging with Logback in ScalaKnoldus Inc.
 
初心者Scala in f@n 第五回 sbt+giter8
初心者Scala in f@n 第五回 sbt+giter8初心者Scala in f@n 第五回 sbt+giter8
初心者Scala in f@n 第五回 sbt+giter8gak2223
 

Similar to Mule custom logging (20)

Logging configuration in mule
Logging configuration in muleLogging configuration in mule
Logging configuration in mule
 
Mule debugging logging_configuration_in_mule
Mule debugging logging_configuration_in_muleMule debugging logging_configuration_in_mule
Mule debugging logging_configuration_in_mule
 
Logging from the bottom up
Logging from the bottom upLogging from the bottom up
Logging from the bottom up
 
Logback
LogbackLogback
Logback
 
The cPanel Log Files
The cPanel Log FilesThe cPanel Log Files
The cPanel Log Files
 
Trouble shoot with linux syslog
Trouble shoot with linux syslogTrouble shoot with linux syslog
Trouble shoot with linux syslog
 
Log4j
Log4jLog4j
Log4j
 
Logging Services for .net - log4net
Logging Services for .net - log4netLogging Services for .net - log4net
Logging Services for .net - log4net
 
Oracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise ApplicationsOracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise Applications
 
Logging
LoggingLogging
Logging
 
C_mysql-1.ppt
C_mysql-1.pptC_mysql-1.ppt
C_mysql-1.ppt
 
Log4j in 8 slides
Log4j in 8 slidesLog4j in 8 slides
Log4j in 8 slides
 
Logging best practice in mule using logger component
Logging best practice in mule using logger componentLogging best practice in mule using logger component
Logging best practice in mule using logger component
 
Prodigyview XML COnfiguration File
Prodigyview XML COnfiguration FileProdigyview XML COnfiguration File
Prodigyview XML COnfiguration File
 
plsql Les05
plsql Les05 plsql Les05
plsql Les05
 
West Yorkshire Meetup #4
West Yorkshire Meetup #4West Yorkshire Meetup #4
West Yorkshire Meetup #4
 
11i Logs
11i Logs11i Logs
11i Logs
 
Logging with Logback in Scala
Logging with Logback in ScalaLogging with Logback in Scala
Logging with Logback in Scala
 
初心者Scala in f@n 第五回 sbt+giter8
初心者Scala in f@n 第五回 sbt+giter8初心者Scala in f@n 第五回 sbt+giter8
初心者Scala in f@n 第五回 sbt+giter8
 
Java logging
Java loggingJava logging
Java logging
 

Recently uploaded

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Mule custom logging

  • 2. Mule Logger – We use the Logger component to log messages such as error messages, status notifications, or exceptions. – We can add a logger anywhere in a flow, and you can configure it to log anything: any string, any Mule expression, or any combination of strings and Mule expressions. – We can log 5 different levels of log messages in mule. They are ERROR, WARN, INFO, DEBUG and TRACE. The default level is INFO.
  • 5. Logger - Example INFO 2017-06-23 11:45:12,276 [[logger1].HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: This is INFO message
  • 6. Logger - Example ERROR 2017-06-23 11:50:04,295 [[logger1].HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: This is ERROR message
  • 7. Logger - Example ERROR 2017-06-23 11:50:04,295 [[logger1].HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: This is ERROR message
  • 8. Logger - Example Observe that DEBUG level logs are not logged in console. This is due to we are using default log4j2 configuration which logs messages of level greater than equal to INFO and DEBUG’s level is lesser than INFO.
  • 10. LOG4J2.XML File Customization Change “org.mule” classes level to DEBUG and trigger the DEBUG request. Observe that many DEBUG logs are logged during the start of application.
  • 11. LOG4J2.XML File Customization Another way to log this particular message is by changing http logger level to DEBUG.
  • 12. Configuring Custom Logging Settings – To configure custom logging settings at server level change $MULE_HOME/conf/log4j2.xml file. – In Anypoint Studio, log4j2.xml appears in the src/main/resources path. – To use custom logging settings file sepeicfy log.configFile to log-settings- file.xml(someFileName) in mule-deploy.properties. The path to log-settings- file.xml can be either relative to working directory or an absolute path.
  • 13. Configuring Custom Logging Settings – If this deployment property isn’t set, when an application is deployed, Mule looks for a config file following a child-first pattern, as listed below: i. Look for a file called log4j2-test.xml in the application classpath ii. Look for a file called log4j2.xml in the application classpath iii. Look for a file called log4j2-test.xml in the domain classpath iv. Look for a file called log4j2.xml in the domain classpath v. Look for a file called log4j2-test.xml in MULE_HOME/conf vi. Look for a file called log4j2.xml in MULE_HOME/conf vii. Apply default configuration.