This is the calling cfc
<cffunction name="init" access="public" output="false" hint="I am the constructor">
<cfargument name="category" type="string" required="true" hint="" />
<!--- more info about log4j can be found at
http://cfdj.sys-con.com/read/42122.htm --->
<cfset var logConfigurator = createObject("java", "org.apache.log4j.xml.DOMConfigurator") />
<cfset logConfigurator.configure( expandPath("../config/log4j.xml") ) />
<cfset variables.logger = createObject("java", "org.apache.log4j.Logger").getLogger(replace(arguments.category, "..", ".", "all")) />
<cfif isnull(variables.logger)>
<cfset variables.priority = createObject("java", "org.apache.log4j.Priority") />
<!--- set the file to append to --->
<cfset variables.logger.getAppender("file").setName( expandPath("../logs/log4j.log") ) />
<cfset variables.logger.getAppender("file").activateOptions() />
</cfif>
<cfreturn this />
</cffunction>
<cffunction name="fatal" access="public" returntype="void" output="false" hint="">
<cfargument name="message" type="string" required="true" hint="" />
<cfif variables.logger.isEnabledFor(variables.priority.FATAL)>
<cfset variables.logger.fatal(arguments.message) />
</cfif>
</cffunction>