Captains.LOG
Mule saves its logs into a file called, predictably enough, mule.log. This is fine until you try to run separate Mule instances on the same machine. MULE_BASE helps there as the log files are saved into MULE_BASE if it is set rather than MULE_HOME. This will still leave me with multiple files called mule.log though.
Thankfully there is a way to rename this file should you need to do so – the MULE_APP environment variable. Rarely used, this environment variable can be set to a string value and Mule will use this value to name the log file.
If I change the script I use to startup Mule to the following:
SET MULE_APP=PrimaryESB call "%MULE_BASE%\bin\mule.bat" -config target/classes/mule-config.xmlthe following two things will happen:
1 – The log file created will no longer be mule.log but PrimaryESB.log
2 – If I choose to run Mule in a console window as a stand-alone application, the window title will change to “PrimaryESB”

If you enjoyed this post, make sure you subscribe to my RSS feed!