Is it possible to log smartly in CAF application?
What is not smart is to use log() method from com.webmethods.caf.faces.bean.BaseFacesBean, beause it logs as jsf logger, so it shares configuration for logging with other things in jsf - it's not application specific.
It is possible when you modify
log4j.init.propertiesfile in${MWS_HOME}/server/default/configfolder.When you publish your CAF application from designer - there is new category created. When you log in as
sysadminuser and you openLogging Configuration link:there is new category added (I added cafTestApplication):
In you CAF application Java, you can get Logger as:
Note: category is in lower case (it was changed by MWS)
All you need to use different log (and not
_full_.log) is to add this (MWS restart needed):And now all your logging messages are in new
newLogFile.logwhich is in same folder as_full_.log.