You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by "Kevan Jahanshahi (Jira)" <ji...@apache.org> on 2022/08/02 15:16:00 UTC
[jira] [Commented] (UNOMI-630) Implement a global solution to avoid multiple same log pollution.
[ https://issues.apache.org/jira/browse/UNOMI-630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17574276#comment-17574276 ]
Kevan Jahanshahi commented on UNOMI-630:
----------------------------------------
A temporary fix have been introduce for this log:
{code:java}
// TODO Temporary solution that should be handle by: https://issues.apache.org/jira/browse/UNOMI-630 (Implement a global solution to avoid multiple same log pollution.)
// warn every 6 hours to avoid log pollution
long timeStamp = nowDeprecatedLogTimestamp.get();
long currentTimeStamp = new Date().getTime();
if (timeStamp == 0 || (timeStamp + TimeUnit.HOURS.toMillis(6) < currentTimeStamp)) {
logger.warn("SetPropertyAction with setPropertyValue: 'now' is deprecated, " +
"please use 'setPropertyValueCurrentEventTimestamp' or 'setPropertyValueCurrentDate' instead of 'setPropertyValue'");
nowDeprecatedLogTimestamp.set(currentTimeStamp);
} {code}
In the SetPropertyAction.
Please remove once we have a global solution for handling this properly
> Implement a global solution to avoid multiple same log pollution.
> -----------------------------------------------------------------
>
> Key: UNOMI-630
> URL: https://issues.apache.org/jira/browse/UNOMI-630
> Project: Apache Unomi
> Issue Type: Task
> Reporter: Kevan Jahanshahi
> Priority: Major
>
> It happen multiple time already where we tried to deprecate stuff and log messages (warn, error, info) like:
> * no action in rule
> * empty condition
> * "now" property deprecated on condition
> * etc ...
> And the problem with that is that this logs can really be logged a millions time depending on the events receved and rules triggered, always triggering them.
> The best approach would be:
> Study a system to avoid logging the same log x Times on a time period. Because those logs are still interesting for the users/integrators as they can enlighten bad implem or stuff to be migrate/update.
> See if we can do something at log4j level.
> The main goal are:
> * light the logs to avoid huge log file that contains millions time same lines
> * keep the useful information
--
This message was sent by Atlassian Jira
(v8.20.10#820010)