Class TenantConverter

java.lang.Object
org.apache.logging.log4j.core.pattern.AbstractPatternConverter
org.apache.logging.log4j.core.pattern.LogEventPatternConverter
com.flowable.platform.common.logging.log4j2.TenantConverter
All Implemented Interfaces:
org.apache.logging.log4j.core.pattern.PatternConverter

@Plugin(name="TenantConverter", category="Converter") public class TenantConverter extends org.apache.logging.log4j.core.pattern.LogEventPatternConverter
A Log4J 2 converter that can be used to output the current tenant. It can be used by using %tenant in the log pattern. When used in a pattern the rules that apply to pattern layout as defined in the Log4J 2 Documentation apply to this as well.

When there is no tenant then <missing> will be used. If it is the empty (null) tenant then <empty> will be used.

Author:
Filip Hrisafov
  • Field Summary

    Fields inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter

    LOGGER

    Fields inherited from interface org.apache.logging.log4j.core.pattern.PatternConverter

    CATEGORY
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    format(org.apache.logging.log4j.core.LogEvent event, StringBuilder toAppendTo)
     
    protected String
     
    newInstance(String[] options)
     

    Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter

    format, handlesThrowable, isVariable

    Methods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter

    getName, getStyleClass

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • newInstance

      public static TenantConverter newInstance(String[] options)
    • format

      public void format(org.apache.logging.log4j.core.LogEvent event, StringBuilder toAppendTo)
      Specified by:
      format in class org.apache.logging.log4j.core.pattern.LogEventPatternConverter
    • getTenantId

      protected String getTenantId()