SuperWorker.Log (SuperWorker v0.4.0)

View Source

Conditional debug logging for SuperCache.

Debug output is suppressed by default. Enable in two ways:

Application config (evaluated at runtime):

# config/config.exs
config :super_cache, debug_log: true

All internal Logger.debug/1 calls are routed through SuperCache.Log.debug/1, which is a no-op when disabled so no message strings are built in production.

Summary

Functions

Emit a debug log if debug logging is enabled.

Functions

debug(chardata_or_fun)

(macro)

Emit a debug log if debug logging is enabled.

Accepts the same forms as Logger.debug/1: a string, iodata, or a zero-arity anonymous function (lazy evaluation).