SlideShare a Scribd company logo
Deep Dive
Logging
All contents © MuleSoft Inc.
Logging – Deep Dive
3
• History of Logging
– Originally was only synchronous, but
this didn’t scale so from Mule 3.6+
libraries were changed to use
asynchronous logging
– Uses the Log4j framework which has
progressed onto log4j2
– Very limited slideshare or articles
about mule logging publically available
– Exam questions are limited to types of
logging produced by connectors and
the runtime upon startup or which logs
get called depending on flow logic
All contents © MuleSoft Inc.
Logging – Deep Dive
4
• Asynchronous Logging
– A thread created for each
log4j2.xml in started apps,
domains and mule servers
– Threads are flushed on server
shut down, but logging events
can be lost on system crash
– Logging threads fail over to
server log, ie mule_ee.log
Synchronous Logging
– Can be used in conjunction
with asynchronous logging
– Performance impacted slightly
All contents © MuleSoft Inc.
Logging – Deep Dive
5
• Logging Bad Practice
– No Logging standards
• mix of json, text or empty loggers, information not
complete
– Hard Coding of loggers
• Not able to adjust via environment variables or test
for error content
– Empty Loggers
• These can fill logs and confuse debugging
– Logging Limits not respected;
• Cloudhub is limited to 100Mb or 30 days
– Sensitive Information
• Usernames and passwords should be reported in
encrypted or obfuscated format
All contents © MuleSoft Inc.
Logging – Deep Dive
6
• Logging Best Practice
– Create standards
• Use json with key: value pairs
• Form common error and logging structures
• Extract Flows to external Dependencies
– Informative Messages
• Visibility into the system (where log is raised)
• Enhanced debugging available (dynamic error levels)
• Before and after system call logs (with payload)
– Request Identifier
• Use the correlationId or assigned code for
transaction (this can help with testing latency)
– Persist Logs
• Maintain historical logs
• Allow non-technical users to access and support
applications
All contents © MuleSoft Inc.
Logging – Deep Dive
7
• Three types of logging
– Runtime
– Connectors
– Custom (Logger element)
Hierarchy of Configuration Files
– Application Resources
– Mulesoft Server conf
– Default (see image)
Override in Deployment
- Using deployment properties (3.8+)
- Configuration Reloading
- Disabling Logging
All contents © MuleSoft Inc.
Logging – Deep Dive
8
• Disabling Cloudhub Logging
– Mulesoft Documentation Article
– Changing Cloudhub directly
requires raising support tickets
– This configuration allows the
local log4j configuration to be
used in place of the default
cloudhub configuration
All contents © MuleSoft Inc.
Logging – Deep Dive
9
• Disabling Complete Logging
– Mulesoft Knowledge Article
– Appenders element will redirect
all logging to console
– The Logging elements sets the
level to OFF, preventing any
output being written to console
– Can be used to rule out logging
issues in performance testing
All contents © MuleSoft Inc.
Logging – Deep Dive
10
• Live Logfile Updating
– Mulesoft Knowledge Article
– Not configured in the default or
template configurations
– Can be used to make logging
more or less verbose in live or
nearly live environments
– Would require access
permissions to the mule server
to edit the log4j2.xml file
All contents © MuleSoft Inc.
Logging – Deep Dive
11
• Different Log Files
– Mulesoft Knowledge Article
– Additional Thread is created
for the separate
AsyncLogger
– Can be used to separate
business logic and standard
INFO logs from error and
debug logs
– Debug logs can include
connection strings and
sensitive information
All contents © MuleSoft Inc.
Logging – Deep Dive
12
• Configuring Custom Log
– Mulesoft Knowledge Article
– Edit ‘mule-deploy.properties’ file
located in app folder
– Can be used to define default
logging file
– Limited by no env variable for
appname
– May come into its own with
Runtime Fabric
– Gets around needing access to
mule_home
All contents © MuleSoft Inc.
Logging – Deep Dive
13
• Verbose Logging
– Mulesoft Knowledge Article
– Module & Transport names
(list to the right)
– Levels are as per SLF4J
specification (see below)
Amazon S3 org.mule.module.s3
Amazon SQS org.mule.modules.sqs
Anypoint MQ
org.mule.module.messaging.mq
com.mulesoft.mq
okhttp3
okio
DB org.mule.module.db
Email org.mule.transport.email
File org.mule.transport.file
FTP
org.mule.transport.ftp
com.mulesoft.mule.transport.ftp
JMS org.mule.transport.jms
Microsoft Service Bus org.mule.modules.microsoftservicebus
Mongo org.mule.module.mongo
Salesforce
org.mule.modules.salesforce
com.sforce
org.mule.module.http.internal.HttpMessageLogger
SFTP
org.mule.transport.sftp
com.jcraft
Object store org.mule.modules.objectstore
TCP org.mule.transport.tcp
UDP org.mule.transport.udp
VM Transport org.mule.transport.vm
WMQ com.mulesoft.mule.transport.wmq
All contents © MuleSoft Inc.
Logging – Deep Dive
14
• Separate Logging Levels
– Mulesoft Knowledge Article
– Create sub flows with multiple
log elements
– Use elements for standard
business logic and separate
debug including payload
– Exception handling could also
include similar multiple log
elements
– Can be switched to info/debug
All contents © MuleSoft Inc.
Logging – Deep Dive
15
• Recommendations
– Separate custom log messages
based on env injected
properties
– Create custom classes of log
messages for reporting
business logic
– Capture a standardized
logging format for exceptions,
business logic, connector
information and validations
– Look at using RFC 7807 to
format error messages
All contents © MuleSoft Inc.
Logging – Deep Dive
16
• Further Research
– Mulesoft Blog
• There was a useful blog about logging
from a Mulesoft trainer in October 2019
– Meetup Example Flows
• The Denver meetup group shared a
project with useful examples of bad and
best practice
– Custom Connector Code
• BigCompass have shared a custom
connector built using the Mulesoft DevKit
to formalise logging structure
Q&A
Logging from the bottom up

More Related Content

What's hot

Simon Jia - The Kohana Framework
Simon Jia - The Kohana FrameworkSimon Jia - The Kohana Framework
Simon Jia - The Kohana Framework
Caroline_Rose
 
Linux Performance Tunning introduction
Linux Performance Tunning introductionLinux Performance Tunning introduction
Linux Performance Tunning introduction
Shay Cohen
 
77739818 troubleshooting-web-logic-103
77739818 troubleshooting-web-logic-10377739818 troubleshooting-web-logic-103
77739818 troubleshooting-web-logic-103
shashank_ibm
 
Mule properties
Mule propertiesMule properties
Mule properties
Gandham38
 
Mule Amazon SNS Connector
Mule Amazon SNS ConnectorMule Amazon SNS Connector
Mule Amazon SNS Connector
Ankush Sharma
 
Introduction To Mule
Introduction To MuleIntroduction To Mule
Introduction To Mule
Roy Prins
 
What's new in MySQL 5.5? FOSDEM 2011
What's new in MySQL 5.5? FOSDEM 2011What's new in MySQL 5.5? FOSDEM 2011
What's new in MySQL 5.5? FOSDEM 2011
Lenz Grimmer
 
Tomcatx performance-tuning
Tomcatx performance-tuningTomcatx performance-tuning
Tomcatx performance-tuning
Vladimir Khokhryakov
 
Learn Oracle WebLogic Server 12c Administration
Learn Oracle WebLogic Server 12c AdministrationLearn Oracle WebLogic Server 12c Administration
Learn Oracle WebLogic Server 12c Administration
Revelation Technologies
 
Mule Quartz connector
Mule Quartz connectorMule Quartz connector
Mule Quartz connector
Ankush Sharma
 
Linux Performance Tunning Kernel
Linux Performance Tunning KernelLinux Performance Tunning Kernel
Linux Performance Tunning Kernel
Shay Cohen
 
Connectors in mule
Connectors in muleConnectors in mule
Connectors in mule
Sindhu VL
 
SUSE Manager with Salt - Deploy and Config Management for MariaDB
SUSE Manager with Salt - Deploy and Config Management for MariaDBSUSE Manager with Salt - Deploy and Config Management for MariaDB
SUSE Manager with Salt - Deploy and Config Management for MariaDB
MariaDB plc
 
weblogic perfomence tuning
weblogic perfomence tuningweblogic perfomence tuning
weblogic perfomence tuning
prathap kumar
 
Mulehdfsconnector 160810122655
Mulehdfsconnector 160810122655Mulehdfsconnector 160810122655
Mulehdfsconnector 160810122655
ppts123456
 
Liberty management
Liberty managementLiberty management
Liberty management
WASdev Community
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
Praneethchampion
 
Mule Requester Usage Demo
Mule Requester Usage DemoMule Requester Usage Demo
Mule Requester Usage Demo
Ramakrishna Narkedamilli
 
Mule properties
Mule propertiesMule properties
Mule properties
Ravinder Singh
 
Creating debian package in mule apps 1
Creating debian package in mule apps 1Creating debian package in mule apps 1
Creating debian package in mule apps 1
Alex Fernandez
 

What's hot (20)

Simon Jia - The Kohana Framework
Simon Jia - The Kohana FrameworkSimon Jia - The Kohana Framework
Simon Jia - The Kohana Framework
 
Linux Performance Tunning introduction
Linux Performance Tunning introductionLinux Performance Tunning introduction
Linux Performance Tunning introduction
 
77739818 troubleshooting-web-logic-103
77739818 troubleshooting-web-logic-10377739818 troubleshooting-web-logic-103
77739818 troubleshooting-web-logic-103
 
Mule properties
Mule propertiesMule properties
Mule properties
 
Mule Amazon SNS Connector
Mule Amazon SNS ConnectorMule Amazon SNS Connector
Mule Amazon SNS Connector
 
Introduction To Mule
Introduction To MuleIntroduction To Mule
Introduction To Mule
 
What's new in MySQL 5.5? FOSDEM 2011
What's new in MySQL 5.5? FOSDEM 2011What's new in MySQL 5.5? FOSDEM 2011
What's new in MySQL 5.5? FOSDEM 2011
 
Tomcatx performance-tuning
Tomcatx performance-tuningTomcatx performance-tuning
Tomcatx performance-tuning
 
Learn Oracle WebLogic Server 12c Administration
Learn Oracle WebLogic Server 12c AdministrationLearn Oracle WebLogic Server 12c Administration
Learn Oracle WebLogic Server 12c Administration
 
Mule Quartz connector
Mule Quartz connectorMule Quartz connector
Mule Quartz connector
 
Linux Performance Tunning Kernel
Linux Performance Tunning KernelLinux Performance Tunning Kernel
Linux Performance Tunning Kernel
 
Connectors in mule
Connectors in muleConnectors in mule
Connectors in mule
 
SUSE Manager with Salt - Deploy and Config Management for MariaDB
SUSE Manager with Salt - Deploy and Config Management for MariaDBSUSE Manager with Salt - Deploy and Config Management for MariaDB
SUSE Manager with Salt - Deploy and Config Management for MariaDB
 
weblogic perfomence tuning
weblogic perfomence tuningweblogic perfomence tuning
weblogic perfomence tuning
 
Mulehdfsconnector 160810122655
Mulehdfsconnector 160810122655Mulehdfsconnector 160810122655
Mulehdfsconnector 160810122655
 
Liberty management
Liberty managementLiberty management
Liberty management
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Mule Requester Usage Demo
Mule Requester Usage DemoMule Requester Usage Demo
Mule Requester Usage Demo
 
Mule properties
Mule propertiesMule properties
Mule properties
 
Creating debian package in mule apps 1
Creating debian package in mule apps 1Creating debian package in mule apps 1
Creating debian package in mule apps 1
 

Similar to Logging from the bottom up

Logging configuration in mule
Logging configuration in muleLogging configuration in mule
Logging configuration in mule
Son Nguyen
 
Cmm vm 002
Cmm vm 002Cmm vm 002
Cmm vm 002
Lalit Panwar
 
Mumbai MuleSoft Meetup 11
Mumbai MuleSoft Meetup 11Mumbai MuleSoft Meetup 11
Mumbai MuleSoft Meetup 11
Akshata Sawant
 
Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4
Tejas Purohit
 
Connect the Dots: Logging and Custom Connectors
Connect the Dots: Logging and Custom ConnectorsConnect the Dots: Logging and Custom Connectors
Connect the Dots: Logging and Custom Connectors
AaronLieberman5
 
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
MuleSoft
 
StorageQuery: federated querying on object stores, powered by Alluxio and Presto
StorageQuery: federated querying on object stores, powered by Alluxio and PrestoStorageQuery: federated querying on object stores, powered by Alluxio and Presto
StorageQuery: federated querying on object stores, powered by Alluxio and Presto
Alluxio, Inc.
 
Ahmedabad MuleSoft 3rd Meetup
Ahmedabad MuleSoft 3rd Meetup Ahmedabad MuleSoft 3rd Meetup
Ahmedabad MuleSoft 3rd Meetup
Rajesh Maheshwari
 
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation SlideMuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
Manish Kumar Yadav
 
Mule custom logging
Mule custom  loggingMule custom  logging
Mule custom logging
Yamini Saraswathi Narimeta
 
Mulesoft meetup 9thmay Thiruvananthapuram
Mulesoft meetup 9thmay ThiruvananthapuramMulesoft meetup 9thmay Thiruvananthapuram
Mulesoft meetup 9thmay Thiruvananthapuram
Anurag Dwivedi
 
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
BIOVIA
 
Syslog.ppt
Syslog.pptSyslog.ppt
Syslog.ppt
ifsharahmad
 
Logback
LogbackLogback
Mule soft meetup warsaw november 13th, 2019
Mule soft meetup   warsaw november 13th, 2019Mule soft meetup   warsaw november 13th, 2019
Mule soft meetup warsaw november 13th, 2019
Patryk Bandurski
 
Centralized Logging System Using ELK Stack
Centralized Logging System Using ELK StackCentralized Logging System Using ELK Stack
Centralized Logging System Using ELK Stack
Rohit Sharma
 
Alfresco tuning part1
Alfresco tuning part1Alfresco tuning part1
Alfresco tuning part1
Luis Cabaceira
 
Alfresco tuning part1
Alfresco tuning part1Alfresco tuning part1
Alfresco tuning part1
Luis Cabaceira
 
(ATS6-PLAT07) Managing AEP in an enterprise environment
(ATS6-PLAT07) Managing AEP in an enterprise environment(ATS6-PLAT07) Managing AEP in an enterprise environment
(ATS6-PLAT07) Managing AEP in an enterprise environment
BIOVIA
 
High Volume Payments using Mule
High Volume Payments using MuleHigh Volume Payments using Mule
High Volume Payments using Mule
Adhish Pendharkar
 

Similar to Logging from the bottom up (20)

Logging configuration in mule
Logging configuration in muleLogging configuration in mule
Logging configuration in mule
 
Cmm vm 002
Cmm vm 002Cmm vm 002
Cmm vm 002
 
Mumbai MuleSoft Meetup 11
Mumbai MuleSoft Meetup 11Mumbai MuleSoft Meetup 11
Mumbai MuleSoft Meetup 11
 
Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4
 
Connect the Dots: Logging and Custom Connectors
Connect the Dots: Logging and Custom ConnectorsConnect the Dots: Logging and Custom Connectors
Connect the Dots: Logging and Custom Connectors
 
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
 
StorageQuery: federated querying on object stores, powered by Alluxio and Presto
StorageQuery: federated querying on object stores, powered by Alluxio and PrestoStorageQuery: federated querying on object stores, powered by Alluxio and Presto
StorageQuery: federated querying on object stores, powered by Alluxio and Presto
 
Ahmedabad MuleSoft 3rd Meetup
Ahmedabad MuleSoft 3rd Meetup Ahmedabad MuleSoft 3rd Meetup
Ahmedabad MuleSoft 3rd Meetup
 
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation SlideMuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
 
Mule custom logging
Mule custom  loggingMule custom  logging
Mule custom logging
 
Mulesoft meetup 9thmay Thiruvananthapuram
Mulesoft meetup 9thmay ThiruvananthapuramMulesoft meetup 9thmay Thiruvananthapuram
Mulesoft meetup 9thmay Thiruvananthapuram
 
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
(ATS3-DEV04) Introduction to Pipeline Pilot Protocol Development for Developers
 
Syslog.ppt
Syslog.pptSyslog.ppt
Syslog.ppt
 
Logback
LogbackLogback
Logback
 
Mule soft meetup warsaw november 13th, 2019
Mule soft meetup   warsaw november 13th, 2019Mule soft meetup   warsaw november 13th, 2019
Mule soft meetup warsaw november 13th, 2019
 
Centralized Logging System Using ELK Stack
Centralized Logging System Using ELK StackCentralized Logging System Using ELK Stack
Centralized Logging System Using ELK Stack
 
Alfresco tuning part1
Alfresco tuning part1Alfresco tuning part1
Alfresco tuning part1
 
Alfresco tuning part1
Alfresco tuning part1Alfresco tuning part1
Alfresco tuning part1
 
(ATS6-PLAT07) Managing AEP in an enterprise environment
(ATS6-PLAT07) Managing AEP in an enterprise environment(ATS6-PLAT07) Managing AEP in an enterprise environment
(ATS6-PLAT07) Managing AEP in an enterprise environment
 
High Volume Payments using Mule
High Volume Payments using MuleHigh Volume Payments using Mule
High Volume Payments using Mule
 

Recently uploaded

Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussionArtificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
OECD Directorate for Financial and Enterprise Affairs
 
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
SkillCertProExams
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Dutch Power
 
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
kkirkland2
 
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPointMẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
1990 Media
 
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussionPro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Dutch Power
 
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussionPro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
samililja
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
gharris9
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Rosie Wells
 
Updated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidismUpdated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidism
Faculty of Medicine And Health Sciences
 
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
gpww3sf4
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
amekonnen
 
ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
ToshihiroIto4
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
gharris9
 
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
OECD Directorate for Financial and Enterprise Affairs
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij
 

Recently uploaded (20)

Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussionArtificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
 
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
 
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
 
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
 
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPointMẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
 
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussionPro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
 
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussionPro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
 
Updated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidismUpdated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidism
 
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
 
ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
 
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
 

Logging from the bottom up

  • 1.
  • 3. All contents © MuleSoft Inc. Logging – Deep Dive 3 • History of Logging – Originally was only synchronous, but this didn’t scale so from Mule 3.6+ libraries were changed to use asynchronous logging – Uses the Log4j framework which has progressed onto log4j2 – Very limited slideshare or articles about mule logging publically available – Exam questions are limited to types of logging produced by connectors and the runtime upon startup or which logs get called depending on flow logic
  • 4. All contents © MuleSoft Inc. Logging – Deep Dive 4 • Asynchronous Logging – A thread created for each log4j2.xml in started apps, domains and mule servers – Threads are flushed on server shut down, but logging events can be lost on system crash – Logging threads fail over to server log, ie mule_ee.log Synchronous Logging – Can be used in conjunction with asynchronous logging – Performance impacted slightly
  • 5. All contents © MuleSoft Inc. Logging – Deep Dive 5 • Logging Bad Practice – No Logging standards • mix of json, text or empty loggers, information not complete – Hard Coding of loggers • Not able to adjust via environment variables or test for error content – Empty Loggers • These can fill logs and confuse debugging – Logging Limits not respected; • Cloudhub is limited to 100Mb or 30 days – Sensitive Information • Usernames and passwords should be reported in encrypted or obfuscated format
  • 6. All contents © MuleSoft Inc. Logging – Deep Dive 6 • Logging Best Practice – Create standards • Use json with key: value pairs • Form common error and logging structures • Extract Flows to external Dependencies – Informative Messages • Visibility into the system (where log is raised) • Enhanced debugging available (dynamic error levels) • Before and after system call logs (with payload) – Request Identifier • Use the correlationId or assigned code for transaction (this can help with testing latency) – Persist Logs • Maintain historical logs • Allow non-technical users to access and support applications
  • 7. All contents © MuleSoft Inc. Logging – Deep Dive 7 • Three types of logging – Runtime – Connectors – Custom (Logger element) Hierarchy of Configuration Files – Application Resources – Mulesoft Server conf – Default (see image) Override in Deployment - Using deployment properties (3.8+) - Configuration Reloading - Disabling Logging
  • 8. All contents © MuleSoft Inc. Logging – Deep Dive 8 • Disabling Cloudhub Logging – Mulesoft Documentation Article – Changing Cloudhub directly requires raising support tickets – This configuration allows the local log4j configuration to be used in place of the default cloudhub configuration
  • 9. All contents © MuleSoft Inc. Logging – Deep Dive 9 • Disabling Complete Logging – Mulesoft Knowledge Article – Appenders element will redirect all logging to console – The Logging elements sets the level to OFF, preventing any output being written to console – Can be used to rule out logging issues in performance testing
  • 10. All contents © MuleSoft Inc. Logging – Deep Dive 10 • Live Logfile Updating – Mulesoft Knowledge Article – Not configured in the default or template configurations – Can be used to make logging more or less verbose in live or nearly live environments – Would require access permissions to the mule server to edit the log4j2.xml file
  • 11. All contents © MuleSoft Inc. Logging – Deep Dive 11 • Different Log Files – Mulesoft Knowledge Article – Additional Thread is created for the separate AsyncLogger – Can be used to separate business logic and standard INFO logs from error and debug logs – Debug logs can include connection strings and sensitive information
  • 12. All contents © MuleSoft Inc. Logging – Deep Dive 12 • Configuring Custom Log – Mulesoft Knowledge Article – Edit ‘mule-deploy.properties’ file located in app folder – Can be used to define default logging file – Limited by no env variable for appname – May come into its own with Runtime Fabric – Gets around needing access to mule_home
  • 13. All contents © MuleSoft Inc. Logging – Deep Dive 13 • Verbose Logging – Mulesoft Knowledge Article – Module & Transport names (list to the right) – Levels are as per SLF4J specification (see below) Amazon S3 org.mule.module.s3 Amazon SQS org.mule.modules.sqs Anypoint MQ org.mule.module.messaging.mq com.mulesoft.mq okhttp3 okio DB org.mule.module.db Email org.mule.transport.email File org.mule.transport.file FTP org.mule.transport.ftp com.mulesoft.mule.transport.ftp JMS org.mule.transport.jms Microsoft Service Bus org.mule.modules.microsoftservicebus Mongo org.mule.module.mongo Salesforce org.mule.modules.salesforce com.sforce org.mule.module.http.internal.HttpMessageLogger SFTP org.mule.transport.sftp com.jcraft Object store org.mule.modules.objectstore TCP org.mule.transport.tcp UDP org.mule.transport.udp VM Transport org.mule.transport.vm WMQ com.mulesoft.mule.transport.wmq
  • 14. All contents © MuleSoft Inc. Logging – Deep Dive 14 • Separate Logging Levels – Mulesoft Knowledge Article – Create sub flows with multiple log elements – Use elements for standard business logic and separate debug including payload – Exception handling could also include similar multiple log elements – Can be switched to info/debug
  • 15. All contents © MuleSoft Inc. Logging – Deep Dive 15 • Recommendations – Separate custom log messages based on env injected properties – Create custom classes of log messages for reporting business logic – Capture a standardized logging format for exceptions, business logic, connector information and validations – Look at using RFC 7807 to format error messages
  • 16. All contents © MuleSoft Inc. Logging – Deep Dive 16 • Further Research – Mulesoft Blog • There was a useful blog about logging from a Mulesoft trainer in October 2019 – Meetup Example Flows • The Denver meetup group shared a project with useful examples of bad and best practice – Custom Connector Code • BigCompass have shared a custom connector built using the Mulesoft DevKit to formalise logging structure
  • 17. Q&A

Editor's Notes

  1. End slide
  2. There are three types of logging as (its one of the exam questions), the system shows errors messages upon system and application startup and connectors and custom logs populate further during the uptime of the mule server There are a hierarchy of config files, where the first files in the application resources directory is used and if not present the one in the conf directory of the mule_home and if this doesn’t exist a default is referenced; This means logging cannot be disabled and startup logging will always occur even if only set to display in the console (for performance testing)
  3. https://docs.mulesoft.com/runtime-manager/custom-log-appender
  4. https://support.mulesoft.com/s/article/disabling-application-logging
  5. https://support.mulesoft.com/s/article/Adding-monitor-interval-for-changes-in-log-configuration-file-in-Mule-runtimes https://logging.apache.org/log4j/2.x/manual/configuration.html
  6. https://support.mulesoft.com/s/article/How-to-direct-some-log-entries-to-a-different-log-file
  7. https://docs.mulesoft.com/mule-runtime/3.8/logging-in-mule#configuring-custom-logging-settings https://docs.mulesoft.com/mule-runtime/3.8/mule-application-deployment-descriptor
  8. https://support.mulesoft.com/s/article/How-to-enable-verbose-logging-for-different-Mule-Modules
  9. https://support.mulesoft.com/s/article/How-to-Separate-Logging-Levels-in-an-Application-e-g-INFO-WARNING-DEBUG
  10. https://docs.mulesoft.com/mule-runtime/4.2/logging-in-mule https://logging.apache.org/log4j/2.x/manual/appenders.html https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Level.html https://logging.apache.org/log4j/2.x/manual/async.html https://dzone.com/articles/rest-api-error-handling-problem-details-response
  11. https://blogs.mulesoft.com/dev/anypoint-platform-dev/mulesoft-development-mule-4-logging/ https://github.com/BigCompass/mulesoft-meetup-logging-demo https://github.com/BigCompass/custom-logger-connector
  12. End slide