Files
EchoHub/src/EchoHub.Server/appsettings.example.json
T
HueByte 38eca99fb1 feat: add server logs functionality with role-based access and system channel management
- Introduced a new migration to add the IsSystem column to the Channels table.
- Updated the DbContext model snapshot to reflect the new IsSystem property.
- Enhanced the ChannelService to manage system channels, including creation, visibility control, and protection against deletion.
- Implemented ServerLogsService to handle live server logging, including reading from log files and managing access based on user roles.
- Created ServerLogsSink to queue log events for streaming to the live log room.
- Developed ServerLogsStreamService to stream log events to clients in real-time.
- Added configuration options for server logs in appsettings.
- Implemented comprehensive unit tests for channel service system channel behavior and server logs functionality.
2026-07-17 20:44:47 +02:00

98 lines
2.3 KiB
JSON

{
"Urls": "http://0.0.0.0:5000",
"ConnectionStrings": {
"DefaultConnection": ""
},
"Jwt": {
"Secret": "CHANGE_ME_minimum_32_characters_long_secret_key",
"Issuer": "EchoHub.Server",
"Audience": "EchoHub.Client"
},
"Server": {
"Name": "My EchoHub Server",
"Description": "A self-hosted EchoHub chat server",
"PublicServer": false,
"PublicHosts": [],
"Tags": [],
"Admins": [],
"Registration": "open",
"DirectoryClaimPath": ""
},
"Storage": {
"Path": "",
"CleanupIntervalHours": 1,
"RetentionDays": 30
},
"Uploads": {
"MaxFileSizeMB": 100,
"MaxImageSizeMB": 10,
"MaxAudioSizeMB": 10,
"MaxAvatarSizeMB": 2,
"MaxAttachmentsPerMessage": 10
},
"Spam": {
"Enabled": true,
"MaxMessagesPerWindow": 8,
"WindowSeconds": 5,
"MaxDuplicateMessages": 3,
"AutoMuteMinutes": 5,
"ViolationThreshold": 5,
"ViolationWindowMinutes": 5,
"MaxJoinsPerWindow": 25,
"JoinWindowSeconds": 30,
"MaxChannelCreatesPerWindow": 3,
"ChannelCreateWindowMinutes": 10
},
"Encryption": {
"Key": "",
"EncryptDatabase": false
},
"ServerLogs": {
"Enabled": true,
"RoomName": "server-logs",
"MinRole": "Mod",
"MinLevel": "Information",
"BacklogLines": 100,
"LogDirectory": "logs",
"LogFilePattern": "echohub-server-*.log"
},
"Irc": {
"Enabled": false,
"Port": 6667,
"TlsEnabled": false,
"TlsPort": 6697,
"TlsCertPath": "",
"TlsCertPassword": "",
"ServerName": "echohub",
"Motd": "Welcome to EchoHub IRC Gateway!",
"PublicBaseUrl": ""
},
"Cors": {
"AllowedOrigins": []
},
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore": "Warning",
"System": "Warning"
}
},
"WriteTo": [
{ "Name": "Console" },
{
"Name": "File",
"Args": {
"path": "logs/echohub-server-.log",
"rollingInterval": "Day",
"retainedFileCountLimit": 14,
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
}
}
]
},
"AllowedHosts": "*"
}