initial
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<cfcomponent extends="taffy.core.api">
|
||||
<cfscript>
|
||||
|
||||
this.name = hash(getCurrentTemplatePath());
|
||||
|
||||
variables.framework = {};
|
||||
|
||||
variables.framework.exceptionLogAdapter = "taffy.bonus.LogToEmail";
|
||||
|
||||
variables.framework.exceptionLogAdapterConfig = StructNew();
|
||||
variables.framework.exceptionLogAdapterConfig.emailFrom = "api-error@yourdomain.com";
|
||||
variables.framework.exceptionLogAdapterConfig.emailTo = "you@yourdomain.com";
|
||||
variables.framework.exceptionLogAdapterConfig.emailSubj = "Exception Trapped in API";
|
||||
variables.framework.exceptionLogAdapterConfig.emailType = "html";
|
||||
|
||||
</cfscript>
|
||||
</cfcomponent>
|
||||
@@ -0,0 +1,10 @@
|
||||
<cfcomponent extends="taffy.core.resource" taffy_uri="/foo">
|
||||
|
||||
<cffunction name="get" access="public" output="false">
|
||||
<cfset local.exception = {} />
|
||||
<cfset local.exception.message = "testing log to email from resource saveLog()" />
|
||||
<cfset saveLog(local.exception) />
|
||||
<cfreturn noData().withStatus(200, "Log Saved") />
|
||||
</cffunction>
|
||||
|
||||
</cfcomponent>
|
||||
Reference in New Issue
Block a user