Browse Source

qdr-temporary-shared-storage: CLI fix logging

Dalibor Votruba 1 year ago
parent
commit
e15e1dea6a

+ 1 - 1
qdr-temporary-shared-storage/@client/qdr.app.tss.client/qdr.app.tss.client.console/Commands/CmdUpload.cs

@@ -118,7 +118,7 @@ namespace qdr.app.qbstack.Commands
 
         protected override Result OnExecute()
         {
-            var srv = new FileUploadService(Url.ToString(), ApiKey, new ConsoleLogger(LogSeverityEnum.Info, LogSeverityEnum.Debug, LogSeverityEnum.Error));
+            var srv = new FileUploadService(Url.ToString(), ApiKey, new ConsoleLogger());
             var uploadRequest = new UploadFileRequest
                 {
                     FilePath = FileName,

+ 3 - 3
qdr-temporary-shared-storage/@client/qdr.app.tss.client/qdr.app.tss.client/Services/FileUploadService.cs

@@ -78,7 +78,7 @@ namespace Quadarax.Application.TemporarySharedStorage.Client.Services
                     return;
                 }
                 
-                Console.WriteLine($"Upload initialized with ID: {initResponse.UploadId}");
+                Log(LogSeverityEnum.Debug, $"Upload initialized with ID: {initResponse.UploadId}");
                 
                 // Step 3: Upload the file in chunks with progress reporting
                 int totalChunks = (int)Math.Ceiling((double)fileInfo.Length / request.ChunkSize);
@@ -121,8 +121,8 @@ namespace Quadarax.Application.TemporarySharedStorage.Client.Services
                 if (finalizeResponse != null)
                 {
                     Log(LogSeverityEnum.Info, "File uploaded successfully!");
-                    Log(LogSeverityEnum.Debug, $"File ID: {finalizeResponse.FileId}");
-                    Log(LogSeverityEnum.Debug, $"Permalink: {finalizeResponse.Permalink}");
+                    Log(LogSeverityEnum.Info, $"File ID: {finalizeResponse.FileId}");
+                    Log(LogSeverityEnum.Info, $"Permalink: {finalizeResponse.Permalink}");
                     Log(LogSeverityEnum.Debug, $"Shortcode: {finalizeResponse.Shortcode}");
                 }
                 else