вам нужно передать ILogger вашим методам, присвоить его переменной c в методе Run:
опция 1:
public static async Task<IActionResult> Run(HttpRequest req, ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");
bool isGood = Verify(myKey, myInput, log);
var token = CreateToken("abc","def",log);
return code != null
? (ActionResult)new OkObjectResult($"Request Successful")
: new BadRequestObjectResult("Bad Request");
} // End Main
public static bool Verify(String key, String input, ILogger log)
{
log.LogInformation("Write something here");
return true;
}
private static string CreateToken(string message, string secret, ILogger log)
{
log.LogInformation("Write something here");
return "";
}
опция 2:
public static class Function1
{
private static ILogger _log = null;
public static async Task<IActionResult> Run(HttpRequest req, ILogger log)
{
_log = log;
log.LogInformation("C# HTTP trigger function processed a request.");
bool isGood = Verify(myKey, myInput;
return code != null
? (ActionResult)new OkObjectResult($"Request Successful")
: new BadRequestObjectResult("Bad Request");
} // End Main
public static bool Verify(String key, String input)
{
_log.LogInformation("Write something here");
return true;
}
private static string CreateToken(string message, string secret)
{
_log.LogInformation("Write something here");
return "";
}
}