[Rt-commit] rt branch, 4.4/cli-statement-log, repushed

Jim Brandt jbrandt at bestpractical.com
Fri Apr 30 15:55:14 EDT 2021


The branch 4.4/cli-statement-log was deleted and repushed:
       was 371f053c647578d3d888aa536c73c87f5781255e
       now 1a51b9434d43925ca2286215677c2d2f70acaa76

1: 371f053c64 ! 1: 77f69ec7f5 Add statement-log option to render statement logs in CLI
    @@ -5,6 +5,20 @@
     diff --git a/lib/RT/Interface/CLI.pm b/lib/RT/Interface/CLI.pm
     --- a/lib/RT/Interface/CLI.pm
     +++ b/lib/RT/Interface/CLI.pm
    +@@
    + If C<debug> is provided as a parameter, it added as an alias for
    + C<--verbose>.
    + 
    ++C<statement-log> provides a command-line version of the C<$StatementLog>
    ++option in the main RT config file. This allows users to log SQL
    ++for queries run in a CLI script in the same manner as the web UI.
    ++It accepts log levels like C<$StatementLog>:
    ++
    ++    --statement-log=debug
    ++
    + =cut
    + 
    + sub Init {
     @@
          push @args, "quiet|q!" => \($hash->{quiet})
              unless $exists{quiet};
    @@ -31,10 +45,11 @@
      
     +END {
     +
    -+    # When pod2usage is called(e.g. with --help), RT.pm won't be
    ++    # When pod2usage is called (e.g. with --help), RT.pm won't be
     +    # required and directly calling RT->Config will error out.
     +    RT::Interface::Web::LogRecordedSQLStatements( RequestData => { Path => '/' } )
     +        if RT->can('Config') && RT->Config->Get('StatementLog');
     +}
     +
      1;
    +
-:  ------- > 2: 1a51b9434d Clarify docs on how to pass additional CLI options to Init



More information about the rt-commit mailing list