com.groupbyinc.flux.common.logging.LogConfigurator.class Maven / Gradle / Ivy
???? 4? 2com/groupbyinc/flux/common/logging/LogConfigurator java/lang/Object LogConfigurator.java 4com/groupbyinc/flux/common/logging/LogConfigurator$2 4com/groupbyinc/flux/common/logging/LogConfigurator$1 8com/groupbyinc/flux/common/settings/Setting$AffixSetting
+com/groupbyinc/flux/common/settings/Setting AffixSetting %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup error +Ljava/util/concurrent/atomic/AtomicBoolean; ERROR_LISTENER 0Lorg/apache/logging/log4j/status/StatusListener; $assertionsDisabled Z ()V
this 4Lcom/groupbyinc/flux/common/logging/LogConfigurator; registerErrorListener ! )java/util/concurrent/atomic/AtomicBoolean # set (Z)V % &
$ ' ,org/apache/logging/log4j/status/StatusLogger ) getLogger 0()Lorg/apache/logging/log4j/status/StatusLogger; + ,
* - / registerListener 3(Lorg/apache/logging/log4j/status/StatusListener;)V 1 2
* 3 configureWithoutConfig 1(Lcom/groupbyinc/flux/common/settings/Settings;)V java/util/Objects 7 requireNonNull &(Ljava/lang/Object;)Ljava/lang/Object; 9 :
8 ; configureStatusLogger =
> configureLoggerLevels @ 6
A settings .Lcom/groupbyinc/flux/common/settings/Settings; configure ((Lcom/groupbyinc/flux/env/Environment;)V java/io/IOException G %com/groupbyinc/flux/cli/UserException I checkErrorListener K
L removeListener N 2
* O java/lang/Throwable Q #com/groupbyinc/flux/env/Environment S 0()Lcom/groupbyinc/flux/common/settings/Settings; C U
T V
configFile ()Ljava/nio/file/Path; X Y
T Z logsFile \ Y
T ] Y(Lcom/groupbyinc/flux/common/settings/Settings;Ljava/nio/file/Path;Ljava/nio/file/Path;)V E _
` environment %Lcom/groupbyinc/flux/env/Environment; d errorListenerIsRegistered ()Z f g
h java/lang/AssertionError j (expected error listener to be registered l (Ljava/lang/Object;)V n
k o get q g
$ r java/lang/IllegalStateException t ;status logger logged an error before logging was configured v (Ljava/lang/String;)V x
u y getListeners ()Ljava/lang/Iterable; { |
* } java/lang/Iterable spliterator ()Ljava/util/Spliterator; ? ? ? ? java/util/stream/StreamSupport ? stream 3(Ljava/util/Spliterator;Z)Ljava/util/stream/Stream; ? ?
? ? "java/lang/invoke/LambdaMetafactory ? metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; ? ?
? ? ? (Ljava/lang/Object;)Z ? "lambda$errorListenerIsRegistered$0 3(Lorg/apache/logging/log4j/status/StatusListener;)Z ? ?
? ? ? test ()Ljava/util/function/Predicate; ? ? ? java/util/stream/Stream ? anyMatch !(Ljava/util/function/Predicate;)Z ? ? ? ? !setLogConfigurationSystemProperty E(Ljava/nio/file/Path;Lcom/groupbyinc/flux/common/settings/Settings;)V ? ?
? #org/apache/logging/log4j/LogManager ?
getContext /(Z)Lorg/apache/logging/log4j/spi/LoggerContext; ? ?
? ? +org/apache/logging/log4j/core/LoggerContext ? java/util/ArrayList ?
? Norg/apache/logging/log4j/core/config/properties/PropertiesConfigurationFactory ?
? java/nio/file/FileVisitOption ? FOLLOW_LINKS Ljava/nio/file/FileVisitOption; ? ? ? ? java/util/EnumSet ? of %(Ljava/lang/Enum;)Ljava/util/EnumSet; ? ?
? ???? ?(Ljava/util/List;Lorg/apache/logging/log4j/core/config/properties/PropertiesConfigurationFactory;Lorg/apache/logging/log4j/core/LoggerContext;)V ?
? java/nio/file/Files ? walkFileTree U(Ljava/nio/file/Path;Ljava/util/Set;ILjava/nio/file/FileVisitor;)Ljava/nio/file/Path; ? ?
? ? java/util/List ? isEmpty ? g ? ? java/lang/StringBuilder ?
? #no log4j2.properties found; tried [ ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ? ?
? ? ] and its subdirectories ? toString ()Ljava/lang/String; ? ?
? ? (ILjava/lang/String;)V ?
J ? ,com/groupbyinc/flux/common/settings/Settings ? java/nio/file/Path ?
java/util/Set ? Eorg/apache/logging/log4j/core/config/composite/CompositeConfiguration ? (Ljava/util/List;)V ?
? ? start 7(Lorg/apache/logging/log4j/core/config/Configuration;)V ? ?
? ? configsPath Ljava/nio/file/Path; logsPath context -Lorg/apache/logging/log4j/core/LoggerContext; configurations NLjava/util/List; Ljava/util/List; factory PLorg/apache/logging/log4j/core/config/properties/PropertiesConfigurationFactory; options 0Ljava/util/Set; Ljava/util/Set; Lorg/apache/logging/log4j/core/config/builder/api/ConfigurationBuilderFactory newConfigurationBuilder I()Lorg/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder;
org/apache/logging/log4j/Level ERROR Lorg/apache/logging/log4j/Level;
Eorg/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder setStatusLevel i(Lorg/apache/logging/log4j/Level;)Lorg/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder; build ()Ljava/lang/Object; 2org/apache/logging/log4j/core/config/Configuration 1org/apache/logging/log4j/core/config/Configurator
initialize c(Lorg/apache/logging/log4j/core/config/Configuration;)Lorg/apache/logging/log4j/core/LoggerContext;
builder ?Lorg/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder; GLorg/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder; *com/groupbyinc/flux/common/logging/Loggers# LOG_DEFAULT_LEVEL_SETTING -Lcom/groupbyinc/flux/common/settings/Setting;%& $' exists 1(Lcom/groupbyinc/flux/common/settings/Settings;)Z)*
+ B(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/lang/Object; q-
. 2com/groupbyinc/flux/common/logging/ESLoggerFactory0
getRootLogger #()Lorg/apache/logging/log4j/Logger;23
14 setLevel D(Lorg/apache/logging/log4j/Logger;Lorg/apache/logging/log4j/Level;)V67
$8 LOG_LEVEL_SETTING :Lcom/groupbyinc/flux/common/settings/Setting$AffixSetting;:; $< getAllConcreteSettings I(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/util/stream/Stream;>?
@ lambda$configureLoggerLevels$1 0(Lcom/groupbyinc/flux/common/settings/Setting;)ZBC
DEC ? filter 9(Ljava/util/function/Predicate;)Ljava/util/stream/Stream;IJ ?K n lambda$configureLoggerLevels$2 ^(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/common/settings/Setting;)VNO
PQ 0(Lcom/groupbyinc/flux/common/settings/Setting;)VS accept M(Lcom/groupbyinc/flux/common/settings/Settings;)Ljava/util/function/Consumer;UV W forEach (Ljava/util/function/Consumer;)VYZ ?[ level .Lcom/groupbyinc/flux/common/SuppressForbidden; reason .sets system property for logging configuration es.logs.base_patha ? ? java/lang/Systemd setProperty 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;fg
eh es.logs.cluster_namej 'com/groupbyinc/flux/cluster/ClusterNamel CLUSTER_NAME_SETTINGn& mo valueq ?
mr com/groupbyinc/flux/node/Nodet NODE_NAME_SETTINGv& uw es.logs.node_namey java/lang/String{ getKey} ?
~ logger.? length ()I??
|? substring (I)Ljava/lang/String;??
|? 5(Ljava/lang/String;)Lorg/apache/logging/log4j/Logger; +?
1? s equals? ?
|? l
access$000 -()Ljava/util/concurrent/atomic/AtomicBoolean; java/lang/Class? desiredAssertionStatus? g
??
$ #(Lorg/apache/logging/log4j/Level;)V ?
? Code LocalVariableTable LineNumberTable
StackMapTable
Exceptions LocalVariableTypeTable RuntimeInvisibleAnnotations BootstrapMethods
SourceFile InnerClasses ! ? / *? ? ? ? <