腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
将
Serilog
配置代码行转换为json配置
时
出错
c#
、
logging
、
asp.net-core
、
serilog
我
找到了一篇文章,博客作者解释了如何通过LogEvent级别将其过滤到一个单独
的
文件
中
,以便进行
Serilog
配置。
我
正在
appsettings.json
中
做
我
所有的
Serilog
配置。这在json
的
配置中会是什么样子,
我
似乎搞不懂如何用json这个lambda
表达式
.l.Filter.ByIncludingOnly(e => e.Level == LogEventLevel
浏览 1
提问于2017-11-30
得票数 3
回答已采纳
1
回答
Serilog
中
具有特定日志类型
的
多个日志文件
logging
、
.net-core
、
serilog
、
loggerfactory
我
已经
在
.net内核
中
实现了
Serilog
,
我
希望为每种日志类型实现多个日志文件。
我
使用
了
Serilog
.Sinks.RollingFile和restrictedToMinimumLevel,
我
能够生成多个文件,但是由于restrictedToMinimumLevel,它也记录在定义
的
级别之上有什么选项/方法来设置logOnlyLevel之类
的
东西吗?
我
可以
使用<
浏览 13
提问于2019-11-19
得票数 0
1
回答
在
appsettings.json
中
使用
Serilog
时
,
我
在
sublogger
中
的
过滤器
表达式
不起作用
serilog
、
appsettings
、
serilog-filter
我
使用
serilog
将日志写入基于名称空间
的
不同文件。正在创建这两个文件,但没有任何内容写入shopify.log。
我
有两个要包含
的
名称空间,它们都包含字符串"Shopify“。
我
可以完全限定它们并进行模式匹配,但这也
不起作用
。
我
使用
的
是
Serilog
.Expressions 3.2.0 如有任何帮助,我们不胜感激!
浏览 56
提问于2021-10-26
得票数 0
回答已采纳
1
回答
创建返回
Serilog
LoggerConfiguration (Asp.Net Core2.0)
的
方法
c#
、
logging
、
serilog
最初,
我
为
Serilog
使用
了一个日志文件,这是
我
通过这样做完成
的
。slc);现在
我
有了
我
的
SubLogger
信任
浏览 1
提问于2017-12-02
得票数 4
回答已采纳
1
回答
将
appsettings.json
节绑定到POCO列表
c#
、
json
、
asp.net-core
、
configuration
、
poco
value.Replace("%APPLICATION_NAME%", Environment.GetEnvironmentVariable("APPLICATION_NAME"));} "
Serilog
": { { "pathFormat&
浏览 7
提问于2017-12-01
得票数 1
回答已采纳
1
回答
如何使
Serilog
从
appsettings.json
获取
表达式
模板和控制台(颜色)主题
asp.net-core
、
themes
、
serilog
、
appsettings
、
serilog-expressions
我
正在尝试
使用
appsettings.json
为
我
的
appsettings.json
应用程序配置
Serilog
,并遵循GitHub
Serilog
.Settings.Configuration项目的说明当我还设置一个主题
时
,
我
无法让控制台输出格式
表达式
从
appsettings.json
中
工作。当两者都在代码中直接配置
时
,它就可以正常工作了。 这是
浏览 10
提问于2022-07-31
得票数 2
1
回答
asp.net来自
appsettings.json
的
核心集
Serilog
.Exceptions
c#
、
exception
、
asp.net-core-2.0
、
serilog
、
serilog-exceptions
我
需要
使用
Serilog
.Exceptions包来捕获异常。
Serilog
是从
appsettings.json
读取
的
"
Serilog
": { "
Serilog
.Sinks.RollingFile], "Application&q
浏览 2
提问于2018-06-21
得票数 3
回答已采纳
3
回答
Serilog
在
asp.net核心2.2API
中
无法从配置
中
工作
c#
、
asp.net-core
、
serilog
IConfiguration configuration) Log.Warning("test"); }
appsettings.json
{ "MinimumLevel": { "Override": {&
浏览 1
提问于2018-12-20
得票数 9
回答已采纳
3
回答
Serilog
:如何在配置文件中指定筛选器
表达式
serilog
我
试图
在
am .json文件中指定此筛选器。但是,试图
在
json文件中指定相同
的
内容是行不通
的
。
浏览 0
提问于2017-05-17
得票数 8
回答已采纳
1
回答
如何
使用
Asp.net 5 (dotnet )
使用
Serilog
登录到SQL server
asp.net-core
、
asp.net-core-mvc
、
serilog
如果
我
在
代码(C#)启动类中进行配置,
我
设法写入了C#接收器。但是,如果
我
在
www.root
中
尝试web.config,它就不能工作;<add key="
serilog
:using:MSSqlServer" value="
Serilog<
浏览 1
提问于2016-03-02
得票数 4
回答已采纳
1
回答
JSON替换
中
的
转义期以覆盖日志命名空间
azure-pipelines-release-pipeline
我
的
appsettings.json
中有以下结构,
我
希望
在
发布管道
中
覆盖System.Net.Http.HttpClient
的
值。{ "MinimumLevel": { "System.Net.Http.HttpClient": "Warning"
浏览 2
提问于2021-03-03
得票数 0
2
回答
ASP.NET核心日志记录-过滤掉系统项目
logging
、
asp.net-core
、
serilog
我
最近设置了
Serilog
来处理我对数据库
的
日志记录活动。但是,当我启动它
时
,
我
注意到行
中
充满了大量
的
System和Microsoft活动。
我
已经尝试
在
我
的
Serilog
过滤器
中
添加了几个重写,但是像Executed action method和Db Command这样
的
方法仍然存在。
我
需要重写什么才能从<em
浏览 0
提问于2018-10-02
得票数 5
1
回答
Serilog
文件日志记录在作为服务运行时未从Worker Service写入
c#
、
windows-services
、
serilog
、
asp.net-core-6.0
我
正在编写一个需要
使用
Serilog
并写入日志文件
的
辅助服务。(.net核心6和)。
使用
Microsoft.Extensions.Logging和编写aspsettings.json
中
配置
的
事件日志
时
,相同
的
服务会将日志记录到事件日志
中
。此外,
我
已经证明
我
可以访问写入日志
的
目录。当我将项目配置为
使用
Serilog
写入日志文件<e
浏览 7
提问于2022-03-09
得票数 1
回答已采纳
1
回答
带有NetCore2.2
的
appsettings.production
中
的
Serilog
覆盖设置
asp.net-core-2.0
、
serilog
当我想要根据不同
的
环境写入数据库
时
,
我
对
serilog
有一个问题。
Serilog
覆盖
我
的
appsettings.production.json,并且总是
在
appsettings.json
中
使用
设置,即使在生产模式下也是如此!
我
在
本地
appsettings.json
中
的
代码 "
Serilog
"
浏览 3
提问于2021-01-15
得票数 2
1
回答
如何
使用
appsettings.json
禁用
Serilog
中
的
服务器证书验证?
c#
、
serilog
、
appsettings
在
serilog
中
使用
电子邮件接收器
时
,
我
收到以下错误 无法发送电子邮件: System.Security.Authentication.AuthenticationException:根据验证过程,通过代码,
我
可以
在
EmailConnectionInfo上提供: ServerCertificateValidationCallback = (s, certificate, chain, sslPolicyErrors) => true 但是
我
正在
浏览 23
提问于2019-12-06
得票数 1
回答已采纳
1
回答
Steeltoe动态记录仪
在
.net核心2.2APP
中
不工作
asp.net-core
、
logging
、
serilog
、
pcf
、
steeltoe
我
试图
在
我
的
核心2.2应用程序中
使用
新
的
。
我
使用
了2.3.0版本
的
Steeltoe.Extensions.Logging.SerilogDynamicLogger包。
在
我
的
program.cs
中
,
我
有以下代码 public static IWebHostBuilder CreateWebHostBuilder(string[] args) =&g
浏览 1
提问于2019-08-27
得票数 1
1
回答
从
appSettings.json
配置
Serilog
时
出现
的
问题
c#
、
.net-core
、
console-application
、
serilog
我
有一个关于
appSettings.json
对
Serilog
的
配置
的
问题。
我
的
项目是一个基于.Net Core3.0
的
控制台应用程序。
我
试图设置
Serilog
,以便将日志信息写入控制台和日志文件。当我
在
代码本身
中
配置所有东西
时
--一切都像预期
的
那样工作。但是,当我试图从
appsettings.json
文件导入
Serilo
浏览 1
提问于2019-12-06
得票数 1
回答已采纳
1
回答
Serilog
.Sink.Mail
的
动态应用程序设置
c#
、
email
、
serilog
、
appsettings
我
想
使用
存储
在
应用程序设置json文件
中
的
配置设置
的
Serilog
.Sinks.Mail,并且可以动态地为
我
发送
的
每封邮件更改主题和邮件接收者。
我
为mailSubject设置了{ message },并
使用
它将日志消息
中
的
第一个单词放入主题中,但我希望为每封邮件预定义主题。示例:
在
事件A
中
,向PersonA@something.
浏览 21
提问于2020-08-28
得票数 3
1
回答
使用
appsettings.json
更改
SeriLog
中
的
最低日志记录级别
c#
、
serilog
我
想通过读取
appsettings.json
的
设置来更改日志记录
的
最低级别
我
的
代码如下所示
Serilog
.Log.Logger = new LoggerConfiguration
浏览 72
提问于2021-10-27
得票数 0
2
回答
ASP.Net核心API自托管日志到文件
asp.net-core
使用
WindowsCore5.0推出Web服务,该服务作为自己
的
ASP.Net服务运行。
我
正在努力弄清楚如何
使用
Microsoft.Extensions.Logging将日志写入文件。
我
希望能够指定与应用程序一起推出
的
appsettings.json
文件中日志文件
的
位置。
我
觉得
我
错过了什么。
我
是否必须
使用
另一个Microsoft.Extensions.Logging库,如
S
浏览 5
提问于2021-06-01
得票数 2
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
在被疯狂嘲讽之后,我决定研究下过滤器源码
你可能不知道的pandas的5个基本技巧
Power BI报表服务器更新
微软 Edge 浏览器 Dev 113 发布
从AngularJS快速跳转到Angular
热门
标签
更多标签
云服务器
ICP备案
实时音视频
即时通信 IM
对象存储
活动推荐
运营活动
广告
关闭
领券