6 changed files with 227 additions and 121 deletions
@ -1,112 +1,143 @@ |
|||
{ |
|||
"App": { |
|||
"TrackingEntitiesChanged": true, |
|||
"SelfUrl": "http://localhost:44385/" |
|||
}, |
|||
"ConnectionStrings": { |
|||
"Default": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", |
|||
"AbpIdentity": "Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456", |
|||
"AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456", |
|||
"AbpTenantManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", |
|||
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", |
|||
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", |
|||
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456" |
|||
}, |
|||
"Location": { |
|||
"Baidu": { |
|||
"AccessKey": "你自己的百度地图WebAPI Key", |
|||
"ExtensionsRoad": true, |
|||
"ExtensionsTown": true, |
|||
"ExtensionsPoi": "1", |
|||
"VisableErrorToClient": true |
|||
}, |
|||
"Tencent": { |
|||
"AccessKey": "你自己的腾讯地图WebAPI Key", |
|||
"SecretKey": "你自己的腾讯地图WebAPI SecretKey Key, 不填的话不计算签名", |
|||
"VisableErrorToClient": true |
|||
} |
|||
}, |
|||
"CAP": { |
|||
"EventBus": { |
|||
"DefaultGroupName": "BackendAdmin", |
|||
"Version": "v1", |
|||
"FailedRetryInterval": 300, |
|||
"FailedRetryCount": 10 |
|||
}, |
|||
"RabbitMQ": { |
|||
"HostName": "Your RabbitMQ server connection address", |
|||
"Port": 5672, |
|||
"UserName": "Your RabbitMQ server connection user", |
|||
"Password": "Your RabbitMQ server connection user password", |
|||
"ExchangeName": "The name of your RabbitMQ server switch", |
|||
"VirtualHost": "Name of your RabbitMQ server VirtualHost" |
|||
} |
|||
}, |
|||
"Redis": { |
|||
"Configuration": "127.0.0.1", |
|||
"InstanceName": "LINGYUN.AbpApplication", |
|||
"DefaultDatabase": 10 |
|||
}, |
|||
"AuthServer": { |
|||
"Authority": "http://localhost:44385/", |
|||
"ApiName": "lingyun-abp-application" |
|||
}, |
|||
"Serilog": { |
|||
"MinimumLevel": { |
|||
"Default": "Debug", |
|||
"Override": { |
|||
"Microsoft.EntityFrameworkCore": "Debug", |
|||
"System": "Warning", |
|||
"Microsoft": "Warning" |
|||
} |
|||
}, |
|||
"Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId" ], |
|||
"WriteTo": [ |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "Logs/Debug-.log", |
|||
"restrictedToMinimumLevel": "Debug", |
|||
"rollingInterval": "Day", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "Logs/Info-.log", |
|||
"restrictedToMinimumLevel": "Information", |
|||
"rollingInterval": "Day", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "Logs/Warn-.log", |
|||
"restrictedToMinimumLevel": "Warning", |
|||
"rollingInterval": "Day", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "Logs/Error-.log", |
|||
"restrictedToMinimumLevel": "Error", |
|||
"rollingInterval": "Day", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "Logs/Fatal-.log", |
|||
"restrictedToMinimumLevel": "Fatal", |
|||
"rollingInterval": "Day", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
} |
|||
] |
|||
} |
|||
} |
|||
{ |
|||
"App": { |
|||
"TrackingEntitiesChanged": true, |
|||
"SelfUrl": "http://localhost:44385/" |
|||
}, |
|||
"ConnectionStrings": { |
|||
"Default": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", |
|||
"AbpIdentity": "Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456", |
|||
"AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456", |
|||
"AbpTenantManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", |
|||
"AbpSettingManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", |
|||
"AbpPermissionManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456", |
|||
"AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform;User Id=root;Password=123456" |
|||
}, |
|||
"Logging": { |
|||
"Serilog": { |
|||
"Elasticsearch": { |
|||
"IndexFormat": "linyun.abp.logging-{0:yyyy.MM.dd}" |
|||
} |
|||
} |
|||
}, |
|||
"AuditLogging": { |
|||
"Elasticsearch": { |
|||
"IndexPrefix": "lingyun.abp.auditing" |
|||
} |
|||
}, |
|||
"Elasticsearch": { |
|||
"NodeUris": "http://localhost:9200" |
|||
}, |
|||
"Location": { |
|||
"Baidu": { |
|||
"AccessKey": "你自己的百度地图WebAPI Key", |
|||
"ExtensionsRoad": true, |
|||
"ExtensionsTown": true, |
|||
"ExtensionsPoi": "1", |
|||
"VisableErrorToClient": true |
|||
}, |
|||
"Tencent": { |
|||
"AccessKey": "你自己的腾讯地图WebAPI Key", |
|||
"SecretKey": "你自己的腾讯地图WebAPI SecretKey Key, 不填的话不计算签名", |
|||
"VisableErrorToClient": true |
|||
} |
|||
}, |
|||
"CAP": { |
|||
"EventBus": { |
|||
"DefaultGroupName": "BackendAdmin", |
|||
"Version": "v1", |
|||
"FailedRetryInterval": 300, |
|||
"FailedRetryCount": 10 |
|||
}, |
|||
"RabbitMQ": { |
|||
"HostName": "Your RabbitMQ server connection address", |
|||
"Port": 5672, |
|||
"UserName": "Your RabbitMQ server connection user", |
|||
"Password": "Your RabbitMQ server connection user password", |
|||
"ExchangeName": "The name of your RabbitMQ server switch", |
|||
"VirtualHost": "Name of your RabbitMQ server VirtualHost" |
|||
} |
|||
}, |
|||
"Redis": { |
|||
"Configuration": "127.0.0.1", |
|||
"InstanceName": "LINGYUN.AbpApplication", |
|||
"DefaultDatabase": 10 |
|||
}, |
|||
"AuthServer": { |
|||
"Authority": "http://localhost:44385/", |
|||
"ApiName": "lingyun-abp-application" |
|||
}, |
|||
"Serilog": { |
|||
"MinimumLevel": { |
|||
"Default": "Debug", |
|||
"Override": { |
|||
"Microsoft.EntityFrameworkCore": "Debug", |
|||
"System": "Warning", |
|||
"Microsoft": "Warning" |
|||
} |
|||
}, |
|||
"Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId" ], |
|||
"WriteTo": [ |
|||
{ |
|||
"Name": "Console", |
|||
"Args": { |
|||
"restrictedToMinimumLevel": "Debug", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
}, |
|||
{ |
|||
"Name": "Elasticsearch", |
|||
"Args": { |
|||
"nodeUris": "http://localhost:9200", |
|||
"indexFormat": "linyun.abp.logging-{0:yyyy.MM.dd}", |
|||
"autoRegisterTemplate": true, |
|||
"autoRegisterTemplateVersion": "ESv7" |
|||
} |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "Logs/Debug-.log", |
|||
"restrictedToMinimumLevel": "Debug", |
|||
"rollingInterval": "Day", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "Logs/Info-.log", |
|||
"restrictedToMinimumLevel": "Information", |
|||
"rollingInterval": "Day", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "Logs/Warn-.log", |
|||
"restrictedToMinimumLevel": "Warning", |
|||
"rollingInterval": "Day", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "Logs/Error-.log", |
|||
"restrictedToMinimumLevel": "Error", |
|||
"rollingInterval": "Day", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "Logs/Fatal-.log", |
|||
"restrictedToMinimumLevel": "Fatal", |
|||
"rollingInterval": "Day", |
|||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" |
|||
} |
|||
} |
|||
] |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,38 @@ |
|||
# LINGYUN.Abp.AuditLogging.Elasticsearch |
|||
|
|||
审计模块 Elasticsearch 实现 |
|||
|
|||
ElasticsearchAuditLogManager 实现了 IAuditLogManager, 审计日志由ES管理 |
|||
ElasticsearchSecurityLogManager 实现了 ISecurityLogManager, 安全日志由ES管理 |
|||
|
|||
## 模块引用 |
|||
|
|||
|
|||
```csharp |
|||
[DependsOn(typeof(AbpAuditLoggingElasticsearchModule))] |
|||
public class YouProjectModule : AbpModule |
|||
{ |
|||
// other |
|||
} |
|||
``` |
|||
|
|||
## 配置项 |
|||
|
|||
* AbpAuditLoggingElasticsearchOptions.IndexPrefix 索引前缀, 默认 auditlogging |
|||
|
|||
## 注意事项 |
|||
|
|||
与租户模块集成, 跨租户时将会切换索引 |
|||
|
|||
## appsettings.json |
|||
|
|||
```json |
|||
{ |
|||
"AuditLogging": { |
|||
"Elasticsearch": { |
|||
"IndexPrefix": "auditlogging" |
|||
} |
|||
} |
|||
} |
|||
|
|||
``` |
|||
@ -0,0 +1,35 @@ |
|||
# LINGYUN.Abp.Elasticsearch |
|||
|
|||
Abp Elasticsearch集成,提供全局唯一IElasticClient访问接口 |
|||
|
|||
## 模块引用 |
|||
|
|||
|
|||
```csharp |
|||
[DependsOn(typeof(AbpElasticsearchModule))] |
|||
public class YouProjectModule : AbpModule |
|||
{ |
|||
// other |
|||
} |
|||
``` |
|||
|
|||
## 配置项 |
|||
|
|||
* AbpElasticsearchOptions.FieldCamelCase 字段是否采用 camelCase 格式, 默认false |
|||
* AbpElasticsearchOptions.NodeUris ES端点,多个端点以,或;分隔 |
|||
* AbpElasticsearchOptions.TypeName 文档名称,默认_doc |
|||
* AbpElasticsearchOptions.ConnectionLimit 最大连接数,详情见 NEST 文档 |
|||
* AbpElasticsearchOptions.UserName 连接用户,详情见 NEST 文档 |
|||
* AbpElasticsearchOptions.Password 用户密码,详情见 NEST 文档 |
|||
* AbpElasticsearchOptions.ConnectionTimeout 连接超时时间,详情见 NEST 文档 |
|||
|
|||
## appsettings.json |
|||
|
|||
```json |
|||
{ |
|||
"Elasticsearch": { |
|||
"NodeUris": "http://localhost:9200" |
|||
} |
|||
} |
|||
|
|||
``` |
|||
Loading…
Reference in new issue