Skip to main content

Log Level

RevitDevTool uses standard System.Diagnostics.Trace output and assigns each entry a log level. The selected minimum level controls which messages are shown or written to the configured outputs.

Available levels​

LevelUse it for
TraceVery detailed diagnostic output
DebugDevelopment and troubleshooting details
InformationNormal progress and completed actions
WarningRecoverable problems or unexpected conditions
ErrorAn operation failed but the host can continue
CriticalA severe failure requiring immediate attention

Configure the minimum level​

Choose the minimum level in the Trace Log settings. Messages below that level are filtered from the logging pipeline. For normal use, Information is a good default; use Debug or Trace while investigating a problem.

Write log messages​

Use the standard .NET trace APIs from C#, F#, Python.NET, IronPython, or a compatible add-in:

using System.Diagnostics;

Trace.TraceInformation("Export started");
Trace.TraceWarning("Room has no boundary");
Trace.TraceError("Export failed: {0}", exception.Message);
Debug.WriteLine("Detailed diagnostic value");

Python scripts can write through the same trace pipeline:

from System.Diagnostics import Trace

Trace.TraceInformation("Analysis started")
Trace.TraceWarning("Element was skipped")
Trace.TraceError("Analysis failed")

RevitDevTool also redirects supported Console.WriteLine and Python print() output into the trace pipeline. Use explicit trace methods when the severity matters.

What happens next​

The level is applied before the message is delivered to the configured Log Output targets. Revit geometry objects written through the standard trace listener pipeline are handled by Geometry Visualization.