Azure WebJobs:Console.WriteLine 和 logger.WriteLine 之间的区别
Azure WebJobs: difference between Console.WriteLine and logger.WriteLine
webjob的方法可以有TextWriter logger
作为参数。但是如果我打电话:
logger.WriteLine("Test");
Console.WriteLine("Test");
它也是一样的。只需将 "INFO" 记录写入控制台和日志文件。
它们有什么区别,TextWriter logger
作为参数有什么意义?
it does the same. Just write "INFO" record to console and logfile.
是的,他们都可以在web job中实现上述功能。您可以在网络作业中使用它们中的任何一个。只是官方定义略有不同。 TextWriter 记录器参数在方法中是可选的。
webjob的方法可以有TextWriter logger
作为参数。但是如果我打电话:
logger.WriteLine("Test");
Console.WriteLine("Test");
它也是一样的。只需将 "INFO" 记录写入控制台和日志文件。
它们有什么区别,TextWriter logger
作为参数有什么意义?
it does the same. Just write "INFO" record to console and logfile.
是的,他们都可以在web job中实现上述功能。您可以在网络作业中使用它们中的任何一个。只是官方定义略有不同。 TextWriter 记录器参数在方法中是可选的。