Bugzilla – Attachment 144738 Details for
Bug 32057
Add optional stack trace to action logs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32057: Replace insert query with use of Koha::ActionLogs
Bug-32057-Replace-insert-query-with-use-of-KohaAct.patch (text/plain), 1.44 KB, created by
Kyle M Hall (khall)
on 2022-12-20 14:24:07 UTC
(
hide
)
Description:
Bug 32057: Replace insert query with use of Koha::ActionLogs
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-12-20 14:24:07 UTC
Size:
1.44 KB
patch
obsolete
>From 61bc357f040113de52a28f96d424827f22b76186 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Tue, 20 Dec 2022 09:21:34 -0500 >Subject: [PATCH] Bug 32057: Replace insert query with use of Koha::ActionLogs > >--- > C4/Log.pm | 18 ++++++++++++++---- > 1 file changed, 14 insertions(+), 4 deletions(-) > >diff --git a/C4/Log.pm b/C4/Log.pm >index 6cddc5ac80..08194a0530 100644 >--- a/C4/Log.pm >+++ b/C4/Log.pm >@@ -31,6 +31,7 @@ use File::Basename qw( basename ); > > use C4::Context; > use Koha::Logger; >+use Koha::ActionLogs; > > use vars qw(@ISA @EXPORT); > >@@ -111,10 +112,19 @@ sub logaction { > } > my $trace = @trace ? to_json( \@trace, { utf8 => 1, pretty => 1 } ) : undef; > >- my $dbh = C4::Context->dbh; >- my $sth=$dbh->prepare("Insert into action_logs (timestamp,user,module,action,object,info,interface,script,trace) values (now(),?,?,?,?,?,?,?,?)"); >- $sth->execute( $usernumber, $modulename, $actionname, $objectnumber, $infos, $interface, $script, $trace ); >- $sth->finish; >+ Koha::ActionLog->new( >+ { >+ timestamp => \'NOW()', >+ user => $usernumber, >+ module => $modulename, >+ action => $actionname, >+ object => $objectnumber, >+ info => $infos, >+ interface => $interface, >+ script => $script, >+ trace => $trace, >+ } >+ )->store(); > > my $logger = Koha::Logger->get( > { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32057
:
142855
|
142857
|
144734
|
144735
|
144736
|
144737
|
144738
|
144769
|
144786
|
144787
|
144788
|
147152
|
147153
|
147154
|
147155
|
147156
|
148162