Skip to content

Plugin/package loader log messages emit literal #var# placeholders instead of interpolated values #2630

Description

@bpamiri

Describe the bug

~/.wheels/servers/<name>/lucee-server/context/logs/wheels_security.log shows entries like:

"INFO","http-nio-60050-exec-1","05/12/2026","15:18:18","http://localhost:60050","Titan","[Wheels] Loading plugin '#local.pluginKey#' from #local.pluginValue.folderPath#"
"INFO","http-nio-60050-exec-1","05/12/2026","15:18:18","http://localhost:60050","Titan","[Wheels] Loading package '#arguments.dirName#' from #arguments.pkgDir#"

The #local.pluginKey#, #local.pluginValue.folderPath#, #arguments.dirName#, #arguments.pkgDir# placeholders are emitted as literal strings instead of the resolved values.

Root cause: CFML's #var# interpolation works in tag context and inside double-quoted attribute values of a CFML tag, but a string value passed to writeLog(text="...") is just a string — the function doesn't pass it back through the CFML expression evaluator.

Why this matters

When a plugin or package fails to load (or even just for normal load tracing), the log message is supposed to tell you which one. With literal placeholders, the log is useless for diagnosing load failures — the operator has to guess which plugin/package was being loaded at that moment, or read source to figure out which code path emitted the message.

Suggested fix

Build the message before passing it to writeLog. For example:

// WRONG — placeholders never interpolate
writeLog(text="[Wheels] Loading plugin '#local.pluginKey#' from #local.pluginValue.folderPath#", ...);

// RIGHT — build the message first
var msg = "[Wheels] Loading plugin '#local.pluginKey#' from #local.pluginValue.folderPath#";
writeLog(text=msg, ...);

Audit vendor/wheels/PackageLoader.cfc and vendor/wheels/Plugins.cfc (or wherever the load-trace messages are emitted) for any writeLog(text="...#var#...") patterns and convert each one.

To Reproduce

  1. Install Wheels 4.0.0-SNAPSHOT+1779.
  2. In any app that has at least one plugin in plugins/ and at least one package in vendor/<pkg>/, run wheels start.
  3. Check ~/.wheels/servers/<name>/lucee-server/context/logs/wheels_security.log — the Loading plugin ... and Loading package ... INFO lines will contain literal #var# tokens.

Environment

  • Wheels: 4.0.0-SNAPSHOT+1779
  • Engine: Lucee 7.0.0.395

🤖 Filed by Claude Code while assisting with a 4.0 upgrade testbed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions