Class LogHelper

  • All Implemented Interfaces:
    Helper<java.lang.Object>

    public class LogHelper
    extends java.lang.Object
    implements Helper<java.lang.Object>
    Log a message. Usage:
     {{log "Look at me!" }}
    
     {{log "This is logged" foo "And so is this"}}
    
     {{log "Log!" level="error"}}
    
     {{#log}}
      Hi {{name}}!
     {{/log}}
     
    Since:
    4.0.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Helper<java.lang.Object> INSTANCE
      A singleton instance of this helper.
      static java.lang.String NAME
      The helper's name.
    • Constructor Summary

      Constructors 
      Constructor Description
      LogHelper()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object apply​(java.lang.Object context, Options options)
      Apply the helper to the context.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • INSTANCE

        public static final Helper<java.lang.Object> INSTANCE
        A singleton instance of this helper.
    • Constructor Detail

      • LogHelper

        public LogHelper()
    • Method Detail

      • apply

        public java.lang.Object apply​(java.lang.Object context,
                                      Options options)
                               throws java.io.IOException
        Description copied from interface: Helper
        Apply the helper to the context.
        Specified by:
        apply in interface Helper<java.lang.Object>
        Parameters:
        context - The context object.
        options - The options object.
        Returns:
        A string result.
        Throws:
        java.io.IOException - If a template cannot be loaded.