This repository was archived by the owner on Jan 6, 2023. It is now read-only.
File tree 2 files changed +13
-2
lines changed
src/main/java/weblogic/logging/exporter
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ This section outlines the steps that are required to add the Weblogic Logging Ex
161
161
It is also strongly recommended that you consider using a different Elastcsearch index name for each domain.
162
162
163
163
If you prefer to place the configuration file in a different location, you can set the environment variable
164
- `WEBLOGIC_LOGGING_EXPORTE_CONFIG_FILE ` to point to the location of the file.
164
+ `WEBLOGIC_LOGGING_EXPORTER_CONFIG_FILE ` to point to the location of the file.
165
165
166
166
1. Restart the servers to activate the changes. After restarting the servers, they will load the WebLogic
167
167
Logging Exporter and start sending their logs to the specified Elasticsearch instance. You can then
Original file line number Diff line number Diff line change @@ -27,8 +27,19 @@ public static void main(String[] argv) {
27
27
If the file doesn't exist, give WARNING, and use default.
28
28
It is assumed that when this is integrated to Operator, the system variable will be set.
29
29
*/
30
+
30
31
String fileName =
31
- System .getProperty ("WEBLOGIC_LOGGING_EXPORTER_CONFIG_FILE" , DEFAULT_CONFIG_FILE );
32
+ System .getProperty (
33
+ "WEBLOGIC_LOGGING_EXPORTER_CONFIG_FILE" ,
34
+ System .getenv ("WEBLOGIC_LOGGING_EXPORTER_CONFIG_FILE" ));
35
+ System .out .println (
36
+ "JavaProperty/EnvVariable WEBLOGIC_LOGGING_EXPORTER_CONFIG_FILE:" + fileName );
37
+ if (fileName == null || fileName .isEmpty ()) {
38
+ System .out .println (
39
+ "Env variable WEBLOGIC_LOGGING_EXPORTER_CONFIG_FILE is not set. Defaulting to:"
40
+ + DEFAULT_CONFIG_FILE );
41
+ fileName = DEFAULT_CONFIG_FILE ;
42
+ }
32
43
File file = new File (fileName );
33
44
System .out .println ("Reading configuration from file name: " + file .getAbsolutePath ());
34
45
Config config = Config .loadConfig (file );
You can’t perform that action at this time.
0 commit comments