An ready way? No. log4j configured logging based on the code running. In this case the code running is the event bus. You can move all the item events to a different file but not just those for a single Item.
You could set up a a separate logger that logs for events.log and then set up a regex filter to only log those entries that match a given pattern. There are tourism’s on the forum for seeing that up. But it’s going to be a whole lot of config.
Personally, if it’s worth while logging any items, it’s worth while logging all the items. Frontal, grep, etc all have great ways to filter a log file to only see what’s relevant.
Yes, but I do not want to filter, I’d like to distribute log events to different log files. I could that do that of course somehow with tail and grep, but it would be nice have it done by log4j.
And log4j2’s way to distribute to different log files is Routes. Maybe I try to play with the context IDs.