Sctt.Common
2.2.6
dotnet add package Sctt.Common --version 2.2.6
NuGet\Install-Package Sctt.Common -Version 2.2.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sctt.Common" Version="2.2.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sctt.Common" Version="2.2.6" />
<PackageReference Include="Sctt.Common" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sctt.Common --version 2.2.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sctt.Common, 2.2.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Sctt.Common@2.2.6
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sctt.Common&version=2.2.6
#tool nuget:?package=Sctt.Common&version=2.2.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
版本记录
v1.6.8-alpha
增加阿里云CDN
builder.Services.AddAlibabaCloud(builder.Configuration);
"AlibabaCloudSetting": {
"AccessKeyId": "xxxx",
"AccessKeySecret": "xxxx",
"Endpoint": "xxxxx"
},
v1.5.4-alpha
增加企业微信通知common
增加出现异常发送企业微信通知
v1.4.5-alpha
appsetting.json 在Logging内添加
"SysErrorMail": {
"Enabled": true, // 启用异常邮件 -- 需增加邮件配置
"ReciveMail": "system@sctt.net" //接收邮箱地址
},
邮件配置如下:
"MailSetting": {
"MailBccArray": "ptc.res1@ptctravel.net.cn",
"MailDccArray": "ptc.res1@ptctravel.net.cn",
"MailEccArray": "ptc.res1@ptctravel.net.cn",
"SendMailSmsUrl": "xxx/mail/SmtpSend",
"SendMailsSmsUrl": "xxx/mail/SmtpSends",
"Token": "xxxxxxx"
},
v1.4.4-alpha
- 增加了
Sctt.Common.Logging日志Attribute
使用方式
- // 日志注册 program.cs 中添加
- builder.Services.AddLoggingSetup(builder.Configuration);
跳过日志监视
方法上加 [SuppressMonitor] 特性
appsetting.json 在Logging内添加
完整Logging配置
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
},
"Console": {
"FormatterName": "simple",
"FormatterOptions": {
"IncludeScopes": false,
"TimestampFormat": "yyyy-MM-dd HH:mm:ss.fff ",
"UseUtcTimestamp": true
}
},
"File": {
"Enabled": false // 启用文件日志,上传到OSS
},
"Database": {
"Enabled": false, // 启用数据库日志
"MinimumLevel": "Information"
},
"Monitor": {
"GlobalEnabled": true, // 启用全局拦截日志
"IncludeOfMethods": [], // 拦截特定方法,当GlobalEnabled=false有效
"ExcludeOfMethods": [], // 排除特定方法,当GlobalEnabled=true有效
"BahLogLevel": "Information", // Oops.Oh 和 Oops.Bah 业务日志输出级别
"WithReturnValue": true, // 是否包含返回值,默认true
"ReturnValueThreshold": 500, // 返回值字符串阈值,默认0全量输出
"JsonBehavior": "None", // 是否输出Json,默认None(OnlyJson、All)
"JsonIndented": false, // 是否格式化Json
"UseUtcTimestamp": false, // 时间格式UTC、LOCAL
"ConsoleLog": true // 是否显示控制台日志
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- AlibabaCloud.SDK.Cdn20180510 (>= 3.2.2)
- AlibabaCloud.SDK.Dm20151123 (>= 1.0.2)
- Aliyun.OSS.SDK.NetCore (>= 2.14.1)
- AspNetCore.HealthChecks.Redis (>= 7.0.1)
- Elastic.Clients.Elasticsearch (>= 8.14.4)
- Furion.Extras.ObjectMapper.Mapster (>= 4.9.4.1)
- Furion.Pure (>= 4.9.7.3)
- Google.Cloud.Translation.V2 (>= 3.4.0)
- IPTools.Core (>= 1.6.0)
- itext.bouncy-castle-adapter (>= 8.0.5)
- itext.pdfhtml (>= 5.0.5)
- Microsoft.AspNetCore.Http.Features (>= 6.0.0-preview.4.21253.5)
- Microsoft.Extensions.Logging (>= 8.0.0)
- MySql.EntityFrameworkCore (>= 7.0.5)
- MySqlConnector (>= 2.5.0)
- NewLife.Redis (>= 6.0.2025.103-beta1037)
- NPOI (>= 2.7.1)
- Polly (>= 7.2.4)
- RabbitMQ.Client (>= 7.0.0)
- SKIT.FlurlHttpClient.Wechat.Work (>= 3.5.0)
- Snowflake.Core (>= 2.0.0)
- StackExchange.Redis (>= 2.8.24)
- UAParser (>= 3.1.47)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.