将 Serilog 日志写入 Amazon S3 的推荐方法是什么?

编程入门 行业动态 更新时间:2024-10-17 05:26:56
本文介绍了将 Serilog 日志写入 Amazon S3 的推荐方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我希望使用 Serilog 将结构化日志数据写入 Amazon S3 存储桶,然后使用 Databricks 进行分析.我以为 Serilog 会有一个 S3 接收器,但我发现我错了.我想也许将 File sink 与其他东西一起使用可能是票,但我不确定那会是什么样子.我想我可以在我的 EC2 实例上安装 S3 存储桶并写入它,但我被告知这是有问题的.你们中的一位能不能给我指出正确的方向?

I'm looking to use Serilog to write structured log data to an Amazon S3 bucket, then analyze using Databricks. I assumed there would be an S3 sink for Serilog but I found I was wrong. I think perhaps using the File sink along with something else might be the ticket, but I'm unsure what that might look like. I suppose I could mount the S3 bucket on my EC2 instance and write to it, but I'm told that's problematic. Could one of you fine folks point me in the right direction?

推荐答案

在撰写本文时,还没有写入 Amazon S3 的接收器,因此您必须自己编写.

As of this writing, there are no Sinks that write to Amazon S3, so you'd have to write your own.

我首先看一下 Serilog.Sinks.AzureBlobStorage sink,因为它可能可以作为您为 Amazon S3 编写 sink 的基础.

I'd start by taking a look at the Serilog.Sinks.AzureBlobStorage sink, as it probably can serve as a base for you to write a sink for Amazon S3.

维基中提供了指向其他几个接收器的源代码的链接,也可以为您提供更多想法:github/serilog/serilog/wiki/Provided-Sinks

Links to the source code for several other sinks are available in the wiki and can give you some more ideas too: github/serilog/serilog/wiki/Provided-Sinks

更多推荐

将 Serilog 日志写入 Amazon S3 的推荐方法是什么?

本文发布于:2023-11-24 04:47:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624025.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法   日志   Serilog   Amazon

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!