Skip to content

Commit

Permalink
try adding some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
RobKraft committed Dec 10, 2024
1 parent 9584800 commit 0661bc4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Lambdas/GetCharityTypes/Function.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ private static async Task Main(string[] args)
return await FunctionHandler(context);
};

//await LambdaBootstrapBuilder.Create(
// handler,
// new SourceGeneratorLambdaJsonSerializer<CustomSerializer>()
//).Build().RunAsync();
await LambdaBootstrapBuilder.Create(
handler,
new SourceGeneratorLambdaJsonSerializer<CustomSerializer>()
).Build().RunAsync();

}

Expand Down Expand Up @@ -76,8 +76,13 @@ public static async Task<string> 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);
}
}

Expand Down

0 comments on commit 0661bc4

Please sign in to comment.