You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the print statement runs on every event, it could send a HUGE amount of text to the logs.
We should avoid logging event data in production, because of PII. The example above logs the user's IP address, which would be bad.
The nashorn engine lets us capture the stdout from the enrichment and redirect it to a string. We could log this string using slf4j at debug level. This means users can add print lines for development, with logging turned on a debug level. But with production settings the debug lines do not appear in the logs.
For debugging purposes, someone might choose to add some print statements to their custom javascript enrichment:
There are a couple of problems with this:
print
statement runs on every event, it could send a HUGE amount of text to the logs.The nashorn engine lets us capture the stdout from the enrichment and redirect it to a string. We could log this string using slf4j at debug level. This means users can add
print
lines for development, with logging turned on a debug level. But with production settings the debug lines do not appear in the logs.Something like....
(that's completely untested)
The text was updated successfully, but these errors were encountered: