Class RewritePolicyAdapter

java.lang.Object
org.apache.log4j.bridge.RewritePolicyAdapter
All Implemented Interfaces:
RewritePolicy

public class RewritePolicyAdapter extends Object implements RewritePolicy
Binds a Log4j 1.x RewritePolicy to Log4j 2.
  • Field Details

  • Constructor Details

    • RewritePolicyAdapter

      public RewritePolicyAdapter(RewritePolicy policy)
      Constructor.
  • Method Details

    • rewrite

      public LogEvent rewrite(LogEvent source)
      Description copied from interface: RewritePolicy
      Rewrite a logging event.
      Specified by:
      rewrite in interface RewritePolicy
      Parameters:
      source - a logging event that may be returned or used to create a new logging event.
      Returns:
      a logging event or null to suppress processing.
    • getPolicy

      public RewritePolicy getPolicy()