Documentation / CFML

Integrate a Lucee or ColdFusion site with Logister.

CFML apps can send events directly to Logister with cfhttp. The best path is a small LogisterClient.cfc wrapper plus Application.cfc.onError() for uncaught exceptions.

Before you start

Create the project with the CFML integration type.

What you needWhy it matters
Project API tokenAuthenticates each request to Logister
Logister host URLUsed to build the ingest and check-in endpoints
Access to Application.cfcLets you hook uncaught exceptions centrally

Setup flow

Recommended installation path

  1. Create the project, choose CFML, and generate an API key.
  2. Add a small LogisterClient.cfc wrapper around cfhttp.
  3. Hook uncaught exceptions into Application.cfc.onError().
  4. Send request timings as transaction events and query timings as metric events.

Tip

Start with uncaught exception capture, then add transactions, metrics, logs, and check-ins one by one as you verify each payload shape.

Start with

Send a structured error event.

shell
POST /api/v1/ingest_events
cfml
application.logister.sendEvent(
  eventType = "error",
  level = "error",
  message = exception.message ?: "Unhandled CFML exception",
  context = {
    exception = {
      type = exception.type ?: "Exception",
      detail = exception.detail ?: "",
      tagContext = exception.tagContext ?: []
    }
  }
);
Verification
request accepted
error visible in project inbox
stack frames rendered from tagContext

Error handling

Capture uncaught exceptions with Application.cfc.onError().

  • exception.type and exception.message drive the exception summary
  • exception.detail improves the ColdFusion exception panel
  • exception.tagContext populates template frames
  • context.cgi.script_name and related CGI fields improve request context
cfml
public void function onError(any exception, string eventName) {
  application.logister.sendEvent(
    eventType = "error",
    level = "error",
    message = exception.message ?: "Unhandled exception",
    context = {
      exception = {
        type = exception.type ?: "Exception",
        detail = exception.detail ?: "",
        tagContext = exception.tagContext ?: []
      },
      cgi = {
        script_name = cgi.script_name ?: "",
        request_method = cgi.request_method ?: "",
        query_string = cgi.query_string ?: ""
      }
    }
  );
}

Important

If you omit tagContext, Logister can still store the event, but the CFML error view loses the template-frame detail that makes debugging much easier.

Event types

Use structured event types consistently.

Event typeTypical CFML use
transactionRequest timing, CFC method timing, remote call latency
metricdb.query, cache timings, outbound HTTP timings
logApplication logs with request or release metadata
check_inScheduled jobs, task runners, cron-style heartbeats
Error
Start here so you can confirm payload authentication and exception rendering.
Transaction
Add request timings next so the performance view becomes useful quickly.
Metric
Layer in db.query and other timings for deeper latency analysis.
Check-in
Finish with scheduled jobs and cron heartbeats for monitor coverage.

More detail

Need more reference material?

The static docs now carry the CFML setup flow directly. For lower-level payload details, pair this page with the HTTP API reference so you can verify exact request shapes and authentication headers.