From 0661bc4fa924bd3cab19bb8ae49cff631b997b31 Mon Sep 17 00:00:00 2001 From: RobKraft Date: Mon, 9 Dec 2024 18:27:58 -0600 Subject: [PATCH] try adding some logging --- Lambdas/GetCharityTypes/Function.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Lambdas/GetCharityTypes/Function.cs b/Lambdas/GetCharityTypes/Function.cs index df86f00..8c8ae3c 100644 --- a/Lambdas/GetCharityTypes/Function.cs +++ b/Lambdas/GetCharityTypes/Function.cs @@ -39,10 +39,10 @@ private static async Task Main(string[] args) return await FunctionHandler(context); }; - //await LambdaBootstrapBuilder.Create( - // handler, - // new SourceGeneratorLambdaJsonSerializer() - //).Build().RunAsync(); + await LambdaBootstrapBuilder.Create( + handler, + new SourceGeneratorLambdaJsonSerializer() + ).Build().RunAsync(); } @@ -76,8 +76,13 @@ public static async Task FunctionHandler(ILambdaContext context) Console.WriteLine($"connstring={_connectionString} and error: {ex.Message}"); } + // Log the serialized output + string serializedTypes = JsonSerializer.Serialize(types, CustomSerializer.Default.ListCharityType); + LambdaLogger.Log($"Reusefull Serialized types: {serializedTypes}"); + + return serializedTypes; // Use the source generator serialization - return JsonSerializer.Serialize(types, CustomSerializer.Default.ListCharityType); + //return JsonSerializer.Serialize(types, CustomSerializer.Default.ListCharityType); } }