heading Template
The LogEntry may be rendered in (at least) two ways:
a simple string (e.g. for stdout)
in a web UI: here we want an HTML representation, preferably with clickable links to related item. To facilitate both these use cases, a template is used from which a String and HTML can be generated. The template is a String which may contain a names in brackets, which refers to facts or actor. Example:
"The model {deletedModel} was deleted by {actor}"
Content copied to clipboard
When combining this template with facts, we can generate a log message:
"The model Author(id: 123) was deleted by User(id: 456)"
Content copied to clipboard
A web UI can generate HTML:
<p>The model <a href="/author/123">Author(id: 123)</a> was deleted by <a href="/user/456">User(id: 456)</a></p>
Content copied to clipboard