Salesforce Debug Log Levels Explained

By Prit Sakhvala, Salesforce Developer · Updated July 2026

Salesforce debug logs have eight levels — NONE, ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST — set per category (ApexCode, Database, System, Workflow, and others) in a Debug Level record. A trace flag then applies that debug level to a user, class, or automated process for a time window. Higher levels log more detail but hit the 20 MB truncation cap faster.

Trace flags vs. debug levels — the two-part system

No active trace flag → no log at all. That's the #1 answer to "why is Salesforce not generating debug logs?" — the flag expired. (ForceLens's Smart Capture creates the flag for you; see how to read Apex debug logs.)

What each category controls

CategoryGovernsNotable events it emits
ApexCodeApex execution: methods, statements, System.debugMETHOD_ENTRY/EXIT, USER_DEBUG, VARIABLE_ASSIGNMENT (FINEST)
ApexProfilingProfiling summaries, cumulative statsCUMULATIVE_LIMIT_USAGE, profiling summaries
DatabaseSOQL, SOSL, DML detailSOQL_EXECUTE_BEGIN/END, DML_BEGIN/END
SystemPlatform internals and system methodsSYSTEM_METHOD_ENTRY/EXIT — very noisy at DEBUG+
WorkflowWorkflow rules, Process Builder, FlowsWF_RULE_*, FLOW_ELEMENT_BEGIN/END
ValidationValidation rule evaluationVALIDATION_RULE, VALIDATION_FORMULA
CalloutExternal HTTP/SOAP requests & responsesCALLOUT_REQUEST/RESPONSE
VisualforceVF page lifecycle and serializationVF_* events

What the levels actually mean

LevelRule of thumb
NONECategory is silent.
ERROR / WARNOnly failures/warnings. Good for categories you don't care about right now.
INFOKey milestones — e.g. Database at INFO logs queries without row-by-row detail.
DEBUGThe workhorse. ApexCode at DEBUG shows USER_DEBUG (your System.debug output).
FINE / FINERAdds method entries/exits and progressively more internal detail.
FINESTEverything — including variable assignments in ApexCode. Maximum insight, maximum log size.

One subtlety: System.debug(LoggingLevel.ERROR, 'msg') tags your statement with a level, so it survives even when ApexCode is turned down — a handy trick for permanent diagnostic lines.

Recommended presets

TaskApexCodeDatabaseWorkflowSystemOthers
General Apex debuggingFINESTINFOINFODEBUGINFO
SOQL investigationFINEFINESTINFOINFOERROR
Flow debuggingDEBUGINFOFINERINFOERROR
Log keeps truncatingDEBUGINFOERRORINFONONE/ERROR
Performance / CPUFINEINFOINFOINFOApexProfiling: FINE

Beating the 20 MB truncation cap

When a log exceeds 20 MB, Salesforce drops lines and stamps *** Skipped markers — often exactly where your bug was. In order of effectiveness:

  1. Silence the noise: System → INFO, Validation/Workflow → ERROR when you don't need them.
  2. Scope to a class: add a class-level trace flag (ForceLens's Advanced Capture does this) so only that class logs at FINEST while the user-level flag stays modest.
  3. Shrink the transaction: reproduce with 1 record instead of 200 where the bug allows.

Whatever levels you pick, the output is still a wall of text — a debug log analyzer like ForceLens turns it into an execution tree, SOQL/DML tabs and a limits dashboard, whatever the verbosity.

Frequently asked questions

What are the debug log levels in Salesforce?

NONE, ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST — set per category in a Debug Level record, applied by a trace flag.

What's the difference between a trace flag and a debug level?

The debug level defines verbosity per category; the trace flag applies it to a user, class, or automated process for a time window. Without an active trace flag, nothing logs.

Which level shows System.debug output?

ApexCode at DEBUG or higher — unless you tag the statement with an explicit level like LoggingLevel.ERROR, which shows even at lower settings.

How do I stop log truncation?

Lower noisy categories (System, Validation, Workflow), scope high-detail tracing to a single class, or shrink the reproducing transaction. The 20 MB cap itself can't be raised.

Set levels in one click

ForceLens's Smart Capture and Advanced Capture create the trace flag with sensible levels for you — then open the captured log analyzed. Free and local.

Add ForceLens to Chrome — Free