This repository was archived by the owner on Jan 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
src/main/java/weblogic/logging/exporter Expand file tree Collapse file tree 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
161161 It is also strongly recommended that you consider using a different Elastcsearch index name for each domain.
162162
163163 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.
165165
1661661. Restart the servers to activate the changes. After restarting the servers, they will load the WebLogic
167167 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) {
2727 If the file doesn't exist, give WARNING, and use default.
2828 It is assumed that when this is integrated to Operator, the system variable will be set.
2929 */
30+
3031 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+ }
3243 File file = new File (fileName );
3344 System .out .println ("Reading configuration from file name: " + file .getAbsolutePath ());
3445 Config config = Config .loadConfig (file );
You can’t perform that action at this time.
0 commit comments