Audit trail for object creation and modification

Author Message

zurgutt -

Thursday 10 September 2009 9:06:29 am

Strangely eZ publish audit trail functions include content delete and content move but omit object creation and modification.

Where would be good place in kernel to include eZAudit::writeAudit functions for those?

Certified eZ developer looking for projects.
zurgutt at gg.ee

Ɓukasz Serwatka

Friday 11 September 2009 12:55:54 am

Hi,

One way can be a single wrokflow event after-publish where you basically check the version number. If version == 1 then you can assume object was just created if is version higher then 1 then object was modified. Should be very simple. Other then that you would need hack the kernel which is maintenance pain.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

zurgutt -

Monday 14 September 2009 2:57:57 am

I meant kernel hack, just one line to add if i knew where. The inner workings of kernel are hard to figure out. Can you advice?

Anyhow, shouldn't this be in kernel by default? Strange that most frequent operations are left out of audit.

Kernel hack often is quicker, easier and more reliable than creating the whole extension/workflow bahoopla. Maintenance is not necessarily that big a pain, can even be automated - always during upgrade diff from untouched original version, apply diff to new version.

Certified eZ developer looking for projects.
zurgutt at gg.ee

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 03:43:16
Script start
Timing: Jan 31 2025 03:43:16
Module start 'layout'
Timing: Jan 31 2025 03:43:16
Module start 'content'
Timing: Jan 31 2025 03:43:16
Module end 'content'
Timing: Jan 31 2025 03:43:16
Script end

Main resources:

Total runtime0.0198 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0045 588.2656151.2266
Module start 'layout' 0.00450.0033 739.4922220.7188
Module start 'content' 0.00770.0108 960.2109997.7422
Module end 'content' 0.01850.0012 1,957.953133.9922
Script end 0.0197  1,991.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002311.8762140.0002
Check MTime0.00105.1013140.0001
Mysql Total
Database connection0.00094.404410.0009
Mysqli_queries0.00188.981330.0006
Looping result0.00000.050610.0000
Template Total0.00094.310.0009
Template load0.00073.332610.0007
Template processing0.00020.986310.0002
Override
Cache load0.00052.341510.0005
General
dbfile0.00115.395580.0001
String conversion0.00000.028940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs