How to configure WebLogic Server (WLS) log filters to exclude logging certain messages based on MessageID?
--> There are certain times when we see some error messages continuously in logs but those are not harmful the functionality is working fine, the error code is misleading, so to avoid this we can apply the logging filter on the error code and we don't see such misleading errors again.
Please follow these steps to exclude logging certain messages based on MessageID:
1. Configure a log filter first.
- Click on <domain-name> in the left pane. In the right pane, under Configuration --> Log filters, create a new log filter.
- Click on the newly created log filter and click on 'Add Expression.'
- For the Expression, specify the following:
- Message Attribute: MSGID
- Operator: =
- Value: complete MessageId (for example: ADFC-62004)
- Click on finish.
2. Now select the expression, and click on the "Negate" button to include the "NOT" condition. Now the condition looks like this:
NOT(MSGID = 'ADFC-62004')
3. Save and activate the changes.
4. Now assign this filter to all servers.
- Click on the server to which this has to be configured.
- Go to Logging --> Advanced section.
- In the log file section, select the filter that is newly created.
- If the stout redirection is enabled, then specify the filter for stdout also.
5. Restart the server.