@@ -119,7 +119,11 @@ This section outlines the steps that are required to add the WebLogic Logging Ex
119
119
</startup-class>
120
120
```
121
121
122
- 1. Add `weblogic-logging-exporter.jar` to your classpath.
122
+ 1. Add `weblogic-logging-exporter.jar` and `snakeyaml-1.27.jar` to your classpath.
123
+
124
+ This project requires `snakeyaml` to parse the YAML configuration file. If you built the project locally,
125
+ you can find this JAR file in your local maven repository at `~/.m2/repository/org/yaml/snakeyaml/1.27/snakeyaml-1.27.jar`.
126
+ Otherwise, you can download it from [Maven Central](https://search.maven.org/artifact/org.yaml/snakeyaml/1.27/bundle).
123
127
124
128
Place the file(s) in a suitable location, e.g. your domain directory.
125
129
@@ -128,39 +132,46 @@ This section outlines the steps that are required to add the WebLogic Logging Ex
128
132
directory is `/u01/base_domain`):
129
133
130
134
```
131
- export CLASSPATH="/u01/base_domain/weblogic-logging-exporter.jar:$CLASSPATH"
135
+ export CLASSPATH="/u01/base_domain/weblogic-logging-exporter.jar:/u01/base_domain/snakeyaml-1.27.jar: $CLASSPATH"
132
136
```
133
137
134
138
1. Create a configuration file for the WebLogic Logging Exporter.
135
139
136
- Create a file named `WebLogicLoggingExporter.yaml` in your domain's `config` directory. You can copy the
137
- [sample provided in this project](samples/WebLogicLoggingExporter.yaml) as a starting point. That sample
138
- contains details of all of the available configuration options. A completed configuration file might look
139
- like this:
140
+ There are two options currently - the version 1.x configuration, or the new version 2.x configuration - please
141
+ note that the 2.x configuration is `alpha` and therefore subject to change as we get close to the 2.0 release.
140
142
141
- ```
142
- publishHost: localhost
143
- publishPort: 9200
144
- domainUID: domain1
145
- weblogicLoggingExporterEnabled: true
146
- weblogicLoggingIndexName: domain1-wls
147
- weblogicLoggingExporterSeverity: Notice
148
- weblogicLoggingExporterBulkSize: 1
149
- weblogicLoggingExporterFilters:
150
- - filterExpression: 'severity > Warning'
151
- ```
143
+ a. Version 1.x configuration
144
+
145
+ Create a file named `WebLogicLoggingExporter.yaml` in your domain's `config` directory. You can copy the
146
+ [sample provided in this project](samples/WebLogicLoggingExporter.yaml) as a starting point. That sample
147
+ contains details of all of the available configuration options. A completed configuration file might look
148
+ like this:
149
+
150
+ ```
151
+ publishHost: localhost
152
+ publishPort: 9200
153
+ domainUID: domain1
154
+ weblogicLoggingExporterEnabled: true
155
+ weblogicLoggingIndexName: domain1-wls
156
+ weblogicLoggingExporterSeverity: Notice
157
+ weblogicLoggingExporterBulkSize: 1
158
+ weblogicLoggingExporterFilters:
159
+ - filterExpression: 'severity > Warning'
160
+ ```
161
+
162
+ Note that you must give a unique `domainUID` to each domain. This value is used to filter logs by domain when you
163
+ send the logs from multiple domains to the same Elasticsearch server. If you are using the WebLogic Kubernetes
164
+ Operator, it is strongly recommended that you use the same `domainUID` value that you use for the domain.
152
165
153
- Note that you must give a unique `domainUID` to each domain. This value is used to filter logs by domain when you
154
- send the logs from multiple domains to the same Elasticsearch server. If you are using the WebLogic Kubernetes
155
- Operator, it is strongly recommended that you use the same `domainUID` value that you use for the domain.
166
+ It is also strongly recommended that you consider using a different Elastcsearch index name for each domain.
156
167
157
- It is also strongly recommended that you consider using a different Elastcsearch index name for each domain.
168
+ b. Version 2.x configuration
158
169
159
- If you prefer to place the configuration file in a different location, you can set the environment variable
160
- `WEBLOGIC_LOGGING_EXPORTER_CONFIG_FILE` to point to the location of the file.
170
+ If you prefer to place the configuration file in a different location, you can set the environment variable
171
+ `WEBLOGIC_LOGGING_EXPORTER_CONFIG_FILE` to point to the location of the file.
161
172
162
- If you want to write the JSON logs to a file instead of sending it elasticsearch directly use the following configuration
163
- [file](samples/WebLogicFileLoggingExporter.yaml) and adjust it to your needs. Make sure to rename it to WebLogicLoggingExporter.yaml.
173
+ If you want to write the JSON logs to a file instead of sending it elasticsearch directly use the following configuration
174
+ [file](samples/WebLogicFileLoggingExporter.yaml) and adjust it to your needs. Make sure to rename it to WebLogicLoggingExporter.yaml.
164
175
165
176
6. Restart the servers to activate the changes. After restarting the servers, they will load the WebLogic
166
177
Logging Exporter and start sending their logs to the specified Elasticsearch instance. You can then
0 commit comments