I want to append from time to time entities in a yaml file, like logging actions, as they arrive. Something like this
item:
entityType: article
entityId: 318
created: 1655282744819
user: "admin"
title: "Morning"
eventType: "viewing"
item:
entityType: event
entityId: 339
created: 1655223444821
user: "admin"
title: "Evening"
eventType: "editing"
But I face with the situation when I can write yaml to a new file only.
objectMapper.writeValue(new File(path), logItem);
Is there any possibilities to append data to existing file? Thanks in advance.