Logger Viewtool

Last Updated: Aug 31, 2021
documentation for the dotCMS Content Management System

The $dotlogger viewtool enables you to write messages to the dotCMS log files from your Velocity code.

MethodparameterDescription
debugStringLogs a message at the DEBUG logging level.
errorStringLogs a message at the ERROR logging level.
infoStringLogs a message at the INFO logging level.
warnStringLogs a message at the WARN logging level.
printTemplateStacknoneLogs a stack trace of the Velocity templates at INFO logging level.

Messages will written to the dotCMS log files based on the Logging Configuration.

The following example shows how the logger tool is mapped in the toolbox.xml file:

    <tool>
        <key>dotlogger</key>
        <scope>request</scope>
        <class>com.dotcms.rendering.velocity.viewtools.DotLoggerTool</class>
    </tool>

On this page

×

We Dig Feedback

Selected excerpt:

×