diff --git a/src/appsettings.json b/src/appsettings.json index 773639d..fb66b26 100644 --- a/src/appsettings.json +++ b/src/appsettings.json @@ -19,7 +19,11 @@ "Logging": { "Debug": { "LogLevel": { - "Default": "Debug" + "Default": "Debug", + "Microsoft.AspNetCore.Hosting": "Warning", + "Microsoft.AspNetCore.Infrastructure": "Warning", + "Microsoft.AspNetCore.Routing": "Warning", + "Microsoft.AspNetCore.Mvc": "Warning" } }, "Console": { diff --git a/src/controllers/PackagePublishController.cs b/src/controllers/PackagePublishController.cs index 18100d1..d83364c 100644 --- a/src/controllers/PackagePublishController.cs +++ b/src/controllers/PackagePublishController.cs @@ -27,7 +27,9 @@ public async Task Upload(CancellationToken cancellationToken) return; } - var me = await userService.GetMeAsync(cancellationToken); + var me = await userService.GetMeAsync(cancellationToken); + + logger.LogInformation($"indexer.IndexAsync"); var result = await indexer.IndexAsync(uploadStream, me, cancellationToken); switch (result.Item1) diff --git a/src/logic/services/PackageIndexingService.cs b/src/logic/services/PackageIndexingService.cs index 1c22ab5..441670d 100644 --- a/src/logic/services/PackageIndexingService.cs +++ b/src/logic/services/PackageIndexingService.cs @@ -30,10 +30,12 @@ public class PackageIndexingService( var iconStream = default(Stream); try - { - var packageReader = await Shard.OpenAsync(packageStream, true, token); + { + logger.LogInformation($"Shard.OpenAsync"); + var packageReader = await Shard.OpenAsync(packageStream, true, token); + logger.LogInformation($"packageReader.GetManifestAsync"); var manifest = await packageReader.GetManifestAsync(token); - + logger.LogInformation($"userService.UserAllowedPublishWorkloads"); if (manifest.IsWorkload && !await userService.UserAllowedPublishWorkloads()) return (PackageIndexingResult.InvalidPackage, "You cannot publish workload package!"); @@ -45,7 +47,7 @@ public class PackageIndexingService( readmeStream = await packageReader.GetReadmeAsync(token); if (package.HasEmbeddedIcon) iconStream = await packageReader.GetIconAsync(token); - + logger.LogInformation($"PackageValidator.ValidateExistAsync"); await PackageValidator.ValidateExistAsync(packageReader); } catch (ShardPackageCorruptedException e) when (e.InnerException is PackageValidatorException validateError) diff --git a/src/logic/services/searchs/FirestoreSearchService.cs b/src/logic/services/searchs/FirestoreSearchService.cs index f3cfa9a..79bc1a7 100644 --- a/src/logic/services/searchs/FirestoreSearchService.cs +++ b/src/logic/services/searchs/FirestoreSearchService.cs @@ -61,7 +61,7 @@ public class FireOperationBuilder(FirestoreDb firestore, IMapper mapper, IUserSe public async Task AddPackage(Package package, UserRecord owner) { if (package == null) throw new ArgumentNullException(nameof(package)); - if (owner == null) throw new ArgumentNullException(nameof(owner)); + if (owner == null) throw new ArgumentNullException(nameof(owner)); var version = package.Version; var normalizedVersion = version.ToNormalizedString();