Skip to content

Commit 492b60f

Browse files
author
ENDAVA\mzorec
committed
PackageTask takes into account TaskLogLevel.
1 parent 3685627 commit 492b60f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/FlubuCore/Tasks/Packaging/PackageTask.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public PackageTask OptimizeZip()
149149
/// Disables logging of filtered out files and files to be copied / zipped.
150150
/// </summary>
151151
/// <returns></returns>
152+
[Obsolete("Use WithLogLevel instead.")]
152153
public PackageTask DisableLogging()
153154
{
154155
_logFiles = false;
@@ -177,6 +178,11 @@ protected override int DoExecute(ITaskContextInternal context)
177178
return 0;
178179
}
179180

181+
if (TaskLogLevel < LogLevel.Info)
182+
{
183+
_logFiles = false;
184+
}
185+
180186
if (string.IsNullOrEmpty(_destinationRootDir))
181187
_destinationRootDir = context.Properties.GetOutputDir();
182188

@@ -238,12 +244,6 @@ protected override int DoExecute(ITaskContextInternal context)
238244
zipFile = Path.Combine(_destinationRootDir, tmp);
239245

240246
DoLogInfo($"Creating zip file {zipFile}");
241-
242-
if (TaskLogLevel < LogLevel.Info)
243-
{
244-
_logFiles = false;
245-
}
246-
247247
ZipProcessor zipProcessor = new ZipProcessor(context, zipper, new FileFullPath(zipFile), df, _optimizeZip, sourceIds, _logFiles);
248248
zipProcessor.Process(copiedPackageDef);
249249
}

0 commit comments

Comments
 (0)