Bug 42766: Add ScriptLog system preference
Adds a new YesNo system preference 'ScriptLog' in the Logging section of system preferences, adjacent to CronjobLog. When enabled, the start and end of non-cron Koha scripts (those using bare 'use Koha::Script' rather than 'use Koha::Script -cron') will be recorded in the action log under the SCRIPTS module. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
fdebc68051
commit
57cceec6bc
|
|
@ -0,0 +1,19 @@
|
|||
use Modern::Perl;
|
||||
use Koha::Installer::Output qw(say_warning say_success say_info);
|
||||
|
||||
return {
|
||||
bug_number => "42766",
|
||||
description => "Add ScriptLog system preference",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
|
||||
$dbh->do(
|
||||
q{
|
||||
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
|
||||
VALUES ( 'ScriptLog', '0', '', 'If enabled, log the start and end of non-cron Koha scripts to the action log (module: SCRIPTS).', 'YesNo' )
|
||||
}
|
||||
);
|
||||
say_success( $out, "Added new system preference 'ScriptLog'" );
|
||||
},
|
||||
};
|
||||
|
|
@ -90,6 +90,12 @@ Logging:
|
|||
1: Log
|
||||
0: "Don't log"
|
||||
- information from cron jobs.
|
||||
-
|
||||
- pref: ScriptLog
|
||||
choices:
|
||||
1: Log
|
||||
0: "Don't log"
|
||||
- the start and end of non-cron Koha scripts.
|
||||
-
|
||||
- pref: ReportsLog
|
||||
choices:
|
||||
|
|
|
|||
Loading…
Reference in New Issue