Class Log

  • All Implemented Interfaces:
    org.ocpsoft.rewrite.config.Operation, org.ocpsoft.rewrite.config.OperationBuilder, org.ocpsoft.rewrite.param.Parameterized

    public class Log
    extends org.ocpsoft.rewrite.config.DefaultOperationBuilder
    implements org.ocpsoft.rewrite.param.Parameterized
    Logging utility class. Usage: Log.message(Level.INFO, "Client requested path: {p}")
    • Method Detail

      • message

        public static Log message​(org.ocpsoft.logging.Logger.Level level,
                                  String message)
        Log a message at the given Logger.Level.

        The message may be parameterized:

        For example, assuming a given Condition has been configured to use a parameter "p"}:

        Path.matches("/{p}")

        The parameter "p" may be referenced in the log message:

        Log.message(Level.INFO, "Client requested path: {p}")

        Parameters:
        level - the log Logger.Level to which the message be written
        message - ParameterizedPattern to be written to the log.
      • message

        public static Log message​(Class<?> cls,
                                  org.ocpsoft.logging.Logger.Level level,
                                  String message)
      • perform

        public void perform​(org.ocpsoft.rewrite.event.Rewrite event,
                            org.ocpsoft.rewrite.context.EvaluationContext context)
        Specified by:
        perform in interface org.ocpsoft.rewrite.config.Operation
      • getRequiredParameterNames

        public Set<String> getRequiredParameterNames()
        Specified by:
        getRequiredParameterNames in interface org.ocpsoft.rewrite.param.Parameterized
      • setParameterStore

        public void setParameterStore​(org.ocpsoft.rewrite.param.ParameterStore store)
        Specified by:
        setParameterStore in interface org.ocpsoft.rewrite.param.Parameterized