Change Log

Search
Feedback

Structr can be instructed to keep track of all the changes that are made to individual nodes and relationships. The corresponding switch in the structr.conf is

application.changelog.enabled = true

When the change log is enabled, Structr will create and update a string property named structrChangeLog on every node. The string contains a separate line for each modification, each line contains a JSON object with the following fields.

General fields

time Timestamp of the change (ms since epoch)
userId ID of the user, 00000000000000000000000000000000 for SuperUser, null for anonymous
userName Name of the user
verb One of create, change, delete, link, unlink

Additional fields for «change» verb

key Property key of the modified property
prev Previous value
val New value

Additional fields for «link» and «unlink» verbs

rel Relationship type
target Target node of the new or deleted relationship

Additional fields for «create» and «delete» verbs

target Target node of the new or deleted relationship

Examples

{
    "time":1450862801447,
    "userId":"00000000000000000000000000000000",
    "userName":"superadmin",
    "verb":"change",
    "key":"cacheForSeconds",
    "prev":null,
    "val":60
}
{
    "time":1450862759772,
    "userId":"f02e59a47dc9492da3e6cb7fb6b3ac25",
    "userName":"admin",
    "verb":"link",
    "rel":"PAGE",
    "target":"6d8757b263c7429fbd432dbbbf261d85"
}

Graph-Browser

Related Articles
About this article
Last change 2016-03-04
Topics FrontendStructr 2.0