From 0ed6fb33c5d3eb52bdb63cdbf739deba9457119d Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Tue, 23 Nov 2021 16:01:48 +0100 Subject: [PATCH] feat(libreoffice): add high verbosity if debug log level --- pkg/modules/libreoffice/unoconv/unoconv.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/modules/libreoffice/unoconv/unoconv.go b/pkg/modules/libreoffice/unoconv/unoconv.go index 899b4ad2..8bb4a24c 100644 --- a/pkg/modules/libreoffice/unoconv/unoconv.go +++ b/pkg/modules/libreoffice/unoconv/unoconv.go @@ -159,6 +159,11 @@ func (mod Unoconv) PDF(ctx context.Context, logger *zap.Logger, inputPath, outpu "pdf", } + checkedEntry := logger.Check(zap.DebugLevel, "check for debug level before setting high verbosity") + if checkedEntry != nil { + args = append(args, "-vvv") + } + if options.Landscape { args = append(args, "--printer", "PaperOrientation=landscape") }