mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-04-23 11:58:50 +02:00
Reduce log verbosity in doc.pl.
Reduce verbosity by only logging sections that contain an execute list directly or in a child section.
This commit is contained in:
parent
df7d633683
commit
97c4d9ec18
@ -270,7 +270,7 @@ eval
|
|||||||
elsif (($strOutput eq 'help' || $strOutput eq 'man') && $oManifest->isBackRest())
|
elsif (($strOutput eq 'help' || $strOutput eq 'man') && $oManifest->isBackRest())
|
||||||
{
|
{
|
||||||
# Generate the command-line help
|
# Generate the command-line help
|
||||||
my $oRender = new BackRestDoc::Common::DocRender('text', $oManifest);
|
my $oRender = new BackRestDoc::Common::DocRender('text', $oManifest, !$bNoExe);
|
||||||
my $oDocConfig =
|
my $oDocConfig =
|
||||||
new BackRestDoc::Common::DocConfig(
|
new BackRestDoc::Common::DocConfig(
|
||||||
new BackRestDoc::Common::Doc("${strBasePath}/xml/reference.xml"), $oRender);
|
new BackRestDoc::Common::Doc("${strBasePath}/xml/reference.xml"), $oRender);
|
||||||
|
@ -57,7 +57,7 @@ sub new
|
|||||||
);
|
);
|
||||||
|
|
||||||
# Create the class hash
|
# Create the class hash
|
||||||
my $self = $class->SUPER::new($strType, $oManifest, $strRenderOutKey);
|
my $self = $class->SUPER::new($strType, $oManifest, $bExe, $strRenderOutKey);
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
if (defined($self->{oSource}{hyCache}))
|
if (defined($self->{oSource}{hyCache}))
|
||||||
|
@ -156,6 +156,7 @@ sub new
|
|||||||
my $strOperation,
|
my $strOperation,
|
||||||
$self->{strType},
|
$self->{strType},
|
||||||
$self->{oManifest},
|
$self->{oManifest},
|
||||||
|
$self->{bExe},
|
||||||
$self->{strRenderOutKey},
|
$self->{strRenderOutKey},
|
||||||
) =
|
) =
|
||||||
logDebugParam
|
logDebugParam
|
||||||
@ -163,6 +164,7 @@ sub new
|
|||||||
__PACKAGE__ . '->new', \@_,
|
__PACKAGE__ . '->new', \@_,
|
||||||
{name => 'strType'},
|
{name => 'strType'},
|
||||||
{name => 'oManifest'},
|
{name => 'oManifest'},
|
||||||
|
{name => 'bExe'},
|
||||||
{name => 'strRenderOutKey', required => false}
|
{name => 'strRenderOutKey', required => false}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -432,6 +434,10 @@ sub build
|
|||||||
$oNode->paramSet('depend-default', $strDependPrev);
|
$oNode->paramSet('depend-default', $strDependPrev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Set log to true if this section has an execute list. This helps reduce the info logging by only showing sections that are
|
||||||
|
# likely to take a log time.
|
||||||
|
$oNode->paramSet('log', $self->{bExe} && $oNode->nodeList('execute-list', false) > 0 ? true : false);
|
||||||
|
|
||||||
# If section content is being pulled from elsewhere go get the content
|
# If section content is being pulled from elsewhere go get the content
|
||||||
if ($oNode->paramTest('source'))
|
if ($oNode->paramTest('source'))
|
||||||
{
|
{
|
||||||
@ -527,6 +533,12 @@ sub build
|
|||||||
if (ref(\$oChild) ne "SCALAR")
|
if (ref(\$oChild) ne "SCALAR")
|
||||||
{
|
{
|
||||||
$self->build($oChild, $oNode, $strPath, $strPathPrefix);
|
$self->build($oChild, $oNode, $strPath, $strPathPrefix);
|
||||||
|
|
||||||
|
# If the child should be logged then log the parent as well so the hierarchy is complete
|
||||||
|
if ($oChild->nameGet() eq 'section' && $oChild->paramGet('log'))
|
||||||
|
{
|
||||||
|
$oNode->paramSet('log', true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,10 @@ sub sectionProcess
|
|||||||
{name => 'iDepth'}
|
{name => 'iDepth'}
|
||||||
);
|
);
|
||||||
|
|
||||||
&log(INFO, (' ' x ($iDepth + 1)) . 'process section: ' . $oSection->paramGet('path'));
|
if ($oSection->paramGet('log'))
|
||||||
|
{
|
||||||
|
&log(INFO, (' ' x ($iDepth + 1)) . 'process section: ' . $oSection->paramGet('path'));
|
||||||
|
}
|
||||||
|
|
||||||
if ($iDepth > 3)
|
if ($iDepth > 3)
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,10 @@ sub sectionProcess
|
|||||||
{name => 'iDepth'}
|
{name => 'iDepth'}
|
||||||
);
|
);
|
||||||
|
|
||||||
&log(INFO, (' ' x ($iDepth + 1)) . 'process section: ' . $oSection->paramGet('path'));
|
if ($oSection->paramGet('log'))
|
||||||
|
{
|
||||||
|
&log(INFO, (' ' x ($iDepth + 1)) . 'process section: ' . $oSection->paramGet('path'));
|
||||||
|
}
|
||||||
|
|
||||||
# Create the section
|
# Create the section
|
||||||
my $strSectionTitle = $self->processText($oSection->nodeGet('title')->textGet());
|
my $strSectionTitle = $self->processText($oSection->nodeGet('title')->textGet());
|
||||||
|
@ -176,7 +176,10 @@ sub sectionProcess
|
|||||||
{name => 'iDepth'}
|
{name => 'iDepth'}
|
||||||
);
|
);
|
||||||
|
|
||||||
&log(INFO, (' ' x ($iDepth + 1)) . 'process section: ' . $oSection->paramGet('path'));
|
if ($oSection->paramGet('log'))
|
||||||
|
{
|
||||||
|
&log(INFO, (' ' x ($iDepth + 1)) . 'process section: ' . $oSection->paramGet('path'));
|
||||||
|
}
|
||||||
|
|
||||||
if ($iDepth > 3)
|
if ($iDepth > 3)
|
||||||
{
|
{
|
||||||
|
@ -206,6 +206,10 @@
|
|||||||
</release-feature-list>
|
</release-feature-list>
|
||||||
|
|
||||||
<release-refactor-list>
|
<release-refactor-list>
|
||||||
|
<release-item>
|
||||||
|
<p>Reduce log verbosity when building documentation by only logging sections that contain an execute list directly or in a child section.</p>
|
||||||
|
</release-item>
|
||||||
|
|
||||||
<release-item>
|
<release-item>
|
||||||
<p>Debian/Ubuntu documentation now builds on Ubuntu 16.</p>
|
<p>Debian/Ubuntu documentation now builds on Ubuntu 16.</p>
|
||||||
</release-item>
|
</release-item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user