Skip to content

Commit

Permalink
Remove CDPT_Debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
EarthlingDavey committed Nov 21, 2024
1 parent dbde2bd commit 2bfa01a
Showing 1 changed file with 0 additions and 54 deletions.
54 changes: 0 additions & 54 deletions public/app/themes/clarity/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,57 +125,3 @@

$search = new MOJ\Intranet\Search();
$search->hooks();

/**
* Add logging on potential causes of high CPU usage
*/

// Log on document_serve
add_action('serve_document', function ( $post_id, $file ) {
error_log('CDPT_Debug: document_serve: ' . $post_id . ' ' . $file);
}, 10, 2);

// Log on document_serve_done
add_action('document_serve_done', function ($file, $attach_id ) {
error_log('CDPT_Debug: document_serve_done: ' . $file . ' ' . $attach_id);
}, 10, 2);

// Log on document edit
add_action('document_edit', function () {
error_log('CDPT_Debug: document_edit');
});

// Log on document saved
add_action('document_saved', function ($doc_id, $attach_id) {
error_log('CDPT_Debug: document_saved: ' . $doc_id . ' ' . $attach_id);
}, 10, 2);

// Log on attachment upload
add_action('add_attachment', function ($attach_id) {
error_log('CDPT_Debug: add_attachment: ' . $attach_id);
});

// Log on edit post
add_action('edit_post', function ($post_id) {
error_log('CDPT_Debug: edit_post: ' . $post_id);
});

// Log on post save
add_action('save_post', function ($post_id) {
error_log('CDPT_Debug: save_post: ' . $post_id);
});

// Log on S3 upload - as3cf_post_upload_attachment
add_action('as3cf_post_upload_attachment', function ($source_id, $item) {
error_log('CDPT_Debug: as3cf_post_upload_attachment: ' . $source_id);
}, 10, 2);

// Log on as3cf_pre_upload_object
add_action('as3cf_pre_upload_object', function ($args, $file) {
error_log('CDPT_Debug: as3cf_pre_upload_object');
}, 10, 2);

// Log on as3cf_post_upload_item
add_action('as3cf_post_upload_item', function ($item) {
error_log('CDPT_Debug: as3cf_post_upload_item');
});

0 comments on commit 2bfa01a

Please sign in to comment.