Class SpringPropertySource

  • java.lang.Object
    • org.apache.logging.log4j.spring.boot.SpringPropertySource
  • All Implemented Interfaces:
    org.apache.logging.log4j.util.PropertySource


    public class SpringPropertySource
    extends java.lang.Object
    implements org.apache.logging.log4j.util.PropertySource
    Returns properties from Spring.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.logging.log4j.util.PropertySource

        org.apache.logging.log4j.util.PropertySource.Comparator, org.apache.logging.log4j.util.PropertySource.Util
    • Constructor Summary

      Constructors 
      Constructor Description
      SpringPropertySource​(org.springframework.core.env.Environment environment)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsProperty​(java.lang.String key)  
      int getPriority​()
      System properties take precendence followed by properties in Log4j properties files.
      java.lang.String getProperty​(java.lang.String key)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.logging.log4j.util.PropertySource

        forEach, getNormalForm, getPropertyNames
    • Constructor Detail

      • SpringPropertySource

        public SpringPropertySource​(org.springframework.core.env.Environment environment)
    • Method Detail

      • getPriority

        public int getPriority​()
        System properties take precendence followed by properties in Log4j properties files. Spring properties follow.
        Specified by:
        getPriority in interface org.apache.logging.log4j.util.PropertySource
        Returns:
        This PropertySource's priority.
      • getProperty

        public java.lang.String getProperty​(java.lang.String key)
        Specified by:
        getProperty in interface org.apache.logging.log4j.util.PropertySource
      • containsProperty

        public boolean containsProperty​(java.lang.String key)
        Specified by:
        containsProperty in interface org.apache.logging.log4j.util.PropertySource

Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.