Skip to content

Commit

Permalink
Function logging
Browse files Browse the repository at this point in the history
  • Loading branch information
terho-alter-ego committed Jan 24, 2023
1 parent c3eb437 commit 5c24a09
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static async Task<IActionResult> Run(
{
log.LogInformation("char index:" + charIndex);
log.LogInformation("End of message -> E");
return GetImageResultForCharacter('E'); // As in End
return GetImageResultForCharacter('E', log); // As in End
}

string patToken = Environment.GetEnvironmentVariable("GitHubPatToken");
Expand Down Expand Up @@ -57,15 +57,16 @@ public static async Task<IActionResult> Run(
var c = dateStr[charIndex];
log.LogInformation("Char:" + c);

return GetImageResultForCharacter(c);
return GetImageResultForCharacter(c, log);
}
}
}
}

private static FileContentResult GetImageResultForCharacter(char v)
private static FileContentResult GetImageResultForCharacter(char v, ILogger log)
{
var returnCode = GetCodeToMatchHeight(v);
log.LogInformation($"IMAGE HEIGHT: {returnCode}");
var img = new System.Drawing.Bitmap(1, returnCode);
using (var ms = new MemoryStream())
{
Expand Down

0 comments on commit 5c24a09

Please sign in to comment.