请向我提供示例应用程序以在 c# 中将日志写入 cloudwatch,我尝试了https://github.com/aws/aws-logging-dotnet ,但没有得到任何帮助。
The AWS documentation for C# is very good. Here is an article specifically about logging .
Basically, the short of it is anything written to Standard Out or Standard Error will write to the logs, such as Console.WriteLine("Some text");
Additionally, with lambda functions, the context contains a static logger that can be used with context.Logger.Log("Write this to log");
I suggest taking some time and giving the documentation a good read and working with their examples, which are also very good.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.