mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-03 11:05:48 +00:00
PT-2052 - Tools should default to unbuffered stdout/stderr
- Added option --[no]buffer-stdout, enabled by default
This commit is contained in:
11
bin/pt-align
11
bin/pt-align
@@ -528,6 +528,10 @@ sub get_opts {
|
||||
}
|
||||
}
|
||||
|
||||
if ( exists $self->{opts}->{'buffer-stdout'} && $self->{opts}->{'buffer-stdout'}->{got} ) {
|
||||
STDOUT->autoflush(1 - $self->{opts}->{'buffer-stdout'}->{value});
|
||||
}
|
||||
|
||||
if ( @ARGV && $self->{strict} ) {
|
||||
$self->save_error("Unrecognized command-line options @ARGV");
|
||||
}
|
||||
@@ -1266,6 +1270,13 @@ L<"SYNOPSIS"> and usage information for details.
|
||||
|
||||
=over
|
||||
|
||||
=item --[no]buffer-stdout
|
||||
|
||||
default: yes
|
||||
|
||||
Enables STDOUT buffering. Disable this option if you want to see live progress
|
||||
when using output post-processing tools such as C<tee> or C<kubectl logs>.
|
||||
|
||||
=item --help
|
||||
|
||||
Show help and exit.
|
||||
|
Reference in New Issue
Block a user