Harden runtime logging, normalize log prefixes, and document DB schemas
This commit is contained in:
parent
18d24f3cbe
commit
a24f562e30
32 changed files with 245 additions and 49 deletions
77
SCHEMA.md
Normal file
77
SCHEMA.md
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
# Database Schema Layout (`game`)
|
||||
|
||||
This project uses multiple PostgreSQL schemas to keep domain data separated and maintainable.
|
||||
|
||||
## Search Path
|
||||
|
||||
Configured on database level:
|
||||
|
||||
```sql
|
||||
ALTER DATABASE game SET search_path = world, economy, progression, gameplay, resources, system, public;
|
||||
```
|
||||
|
||||
So unqualified table names still resolve in this order.
|
||||
|
||||
---
|
||||
|
||||
## Schemas
|
||||
|
||||
### `world`
|
||||
Map/world topology and placements.
|
||||
|
||||
- `server_maps`
|
||||
- `server_map_flags`
|
||||
- `map_portals`
|
||||
- `map_npcs`
|
||||
- `map_monsters`
|
||||
- `map_teleporters`
|
||||
|
||||
### `economy`
|
||||
Shops, drops, and loot containers.
|
||||
|
||||
- `shops`
|
||||
- `shop_items`
|
||||
- `shop_skills`
|
||||
- `item_boxes`
|
||||
- `item_box_items`
|
||||
- `drops`
|
||||
|
||||
### `progression`
|
||||
Questing and recipe progression data.
|
||||
|
||||
- `recipes`
|
||||
- `recipe_items`
|
||||
- `quests`
|
||||
- `quest_objectives`
|
||||
- `quest_prizes`
|
||||
- `quest_npcs`
|
||||
- `tutorials`
|
||||
|
||||
### `gameplay`
|
||||
Combat/gameplay mechanics and event configs.
|
||||
|
||||
- `skills`
|
||||
- `skill_bcards`
|
||||
- `skill_combos`
|
||||
- `minigame_config`
|
||||
- `minigame_scores_holders`
|
||||
- `global_minigame_config`
|
||||
- `gameevent_instant_battle_configs`
|
||||
|
||||
### `resources`
|
||||
Raw synced file resources (DB-first support).
|
||||
|
||||
- `resource_files`
|
||||
|
||||
### `system`
|
||||
System-level metadata.
|
||||
|
||||
- `__EFMigrationsHistory`
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
- Keep new feature tables in the matching domain schema, **not** in `public`.
|
||||
- If you add EF migrations, ensure schema-qualified table mapping is explicit.
|
||||
- DB-first runtime loaders depend on these tables being present and populated.
|
||||
79
docker-compose.prod.yml
Normal file
79
docker-compose.prod.yml
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
services:
|
||||
master:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
login:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
gamechannel:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
database:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
bazaar:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
family:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
relation:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
mail:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
translation:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
logs:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
scheduler:
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT_OVERRIDE:-Production}
|
||||
Logging__LogLevel__Default: ${LOG_LEVEL_DEFAULT:-Error}
|
||||
Logging__LogLevel__Microsoft: ${LOG_LEVEL_MICROSOFT:-Error}
|
||||
Logging__LogLevel__Microsoft.AspNetCore: ${LOG_LEVEL_ASPNETCORE:-Error}
|
||||
Logging__LogLevel__Microsoft.Hosting.Lifetime: ${LOG_LEVEL_HOSTING_LIFETIME:-Error}
|
||||
|
||||
|
|
@ -100,6 +100,8 @@ services:
|
|||
WINGSEMU_MONGO_PWD: ${MONGO_ROOT_PASSWORD}
|
||||
MQTT_BROKER_ADDRESS: mqtt
|
||||
MQTT_BROKER_PORT: 1883
|
||||
ASPNETCORE_URLS: ""
|
||||
Logging__LogLevel__Microsoft.AspNetCore.Server.Kestrel: Error
|
||||
command: ["/app/Master.dll"]
|
||||
ports:
|
||||
- "20500:20500"
|
||||
|
|
@ -237,6 +239,7 @@ services:
|
|||
REDIS_PORT: 6379
|
||||
MQTT_BROKER_ADDRESS: mqtt
|
||||
MQTT_BROKER_PORT: 1883
|
||||
Logging__LogLevel__Microsoft.AspNetCore.Server.Kestrel: Error
|
||||
command: ["/app/DatabaseServer.dll"]
|
||||
ports:
|
||||
- "29999:29999"
|
||||
|
|
@ -273,6 +276,7 @@ services:
|
|||
REDIS_PORT: 6379
|
||||
MQTT_BROKER_ADDRESS: mqtt
|
||||
MQTT_BROKER_PORT: 1883
|
||||
Logging__LogLevel__Microsoft.AspNetCore.Server.Kestrel: Error
|
||||
command: ["/app/BazaarServer.dll"]
|
||||
volumes:
|
||||
- ./resources:/app/resources:ro
|
||||
|
|
@ -312,6 +316,7 @@ services:
|
|||
REDIS_PORT: 6379
|
||||
MQTT_BROKER_ADDRESS: mqtt
|
||||
MQTT_BROKER_PORT: 1883
|
||||
Logging__LogLevel__Microsoft.AspNetCore.Server.Kestrel: Error
|
||||
command: ["/app/FamilyServer.dll"]
|
||||
volumes:
|
||||
- ./resources:/app/resources:ro
|
||||
|
|
@ -351,6 +356,7 @@ services:
|
|||
REDIS_PORT: 6379
|
||||
MQTT_BROKER_ADDRESS: mqtt
|
||||
MQTT_BROKER_PORT: 1883
|
||||
Logging__LogLevel__Microsoft.AspNetCore.Server.Kestrel: Error
|
||||
command: ["/app/RelationServer.dll"]
|
||||
volumes:
|
||||
- ./resources:/app/resources:ro
|
||||
|
|
@ -390,6 +396,7 @@ services:
|
|||
REDIS_PORT: 6379
|
||||
MQTT_BROKER_ADDRESS: mqtt
|
||||
MQTT_BROKER_PORT: 1883
|
||||
Logging__LogLevel__Microsoft.AspNetCore.Server.Kestrel: Error
|
||||
command: ["/app/MailServer.dll"]
|
||||
volumes:
|
||||
- ./resources:/app/resources:ro
|
||||
|
|
@ -420,6 +427,7 @@ services:
|
|||
REDIS_PORT: 6379
|
||||
MQTT_BROKER_ADDRESS: mqtt
|
||||
MQTT_BROKER_PORT: 1883
|
||||
Logging__LogLevel__Microsoft.AspNetCore.Server.Kestrel: Error
|
||||
command: ["/app/TranslationsServer.dll"]
|
||||
volumes:
|
||||
- ./translations:/app/translations:ro
|
||||
|
|
@ -456,6 +464,8 @@ services:
|
|||
WINGSEMU_MONGO_PWD: ${MONGO_ROOT_PASSWORD}
|
||||
MQTT_BROKER_ADDRESS: mqtt
|
||||
MQTT_BROKER_PORT: 1883
|
||||
ASPNETCORE_URLS: ""
|
||||
Logging__LogLevel__Microsoft.AspNetCore.Server.Kestrel: Error
|
||||
command: ["/app/LogsServer.dll"]
|
||||
ports:
|
||||
- "28888:28888"
|
||||
|
|
@ -493,3 +503,4 @@ volumes:
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ namespace BazaarServer
|
|||
IHostBuilder host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s =>
|
||||
{
|
||||
s.ListenAnyIP(short.Parse(Environment.GetEnvironmentVariable("BAZAAR_SERVER_PORT") ?? "25555"), options => { options.Protocols = HttpProtocols.Http2; });
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
|
|
@ -123,7 +123,7 @@ namespace DatabaseServer.Managers
|
|||
character = await GetCharacterBySlot(characterDto.AccountId, characterDto.Slot);
|
||||
if (character != null)
|
||||
{
|
||||
Log.Warn("[CHARACTER_SAVE_SYSTEM][CreateCharacter] Found a character already in the desired slot." +
|
||||
Log.Warn("[CHARACTER_SAVE_SYSTEM][CREATE_CHARACTER] Found a character already in the desired slot." +
|
||||
$"AccountId: '{character.AccountId.ToString()}' CharacterId: '{character.Id.ToString()}' Slot: '{character.Slot.ToString()}'");
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ namespace DatabaseServer
|
|||
IHostBuilder host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s =>
|
||||
{
|
||||
s.ListenAnyIP(short.Parse(Environment.GetEnvironmentVariable("DATABASE_SERVER_PORT") ?? "29999"), options => { options.Protocols = HttpProtocols.Http2; });
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ namespace DiscordNotifier
|
|||
IHostBuilder host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s => { s.ListenAnyIP(28000); });
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ namespace FamilyServer
|
|||
IHostBuilder host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s =>
|
||||
{
|
||||
s.ListenAnyIP(short.Parse(Environment.GetEnvironmentVariable("FAMILY_SERVER_PORT") ?? "26666"), options => { options.Protocols = HttpProtocols.Http2; });
|
||||
|
|
|
|||
|
|
@ -699,7 +699,7 @@ namespace GameChannel.Network
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error("[Handler Error]", ex);
|
||||
Log.Error("[HANDLER_ERROR]", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ namespace GameChannel
|
|||
IHostBuilder hostBuilder = Host.CreateDefaultBuilder(args);
|
||||
hostBuilder.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s =>
|
||||
{
|
||||
s.ListenAnyIP(Convert.ToInt32(Environment.GetEnvironmentVariable("HTTP_LISTEN_PORT") ?? "17500"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// WingsEmu
|
||||
// WingsEmu
|
||||
//
|
||||
// Developed by NosWings Team
|
||||
|
||||
|
|
@ -65,12 +65,12 @@ namespace LoginServer.Network
|
|||
|
||||
protected override void OnStarted()
|
||||
{
|
||||
Log.Info("[TCP-SERVER] Started!");
|
||||
Log.Info("[TCP_SERVER] Started!");
|
||||
}
|
||||
|
||||
protected override void OnError(SocketError error)
|
||||
{
|
||||
Log.Info("[TCP-SERVER] SocketError");
|
||||
Log.Info("[TCP_SERVER] SocketError");
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ namespace LogsServer
|
|||
IHostBuilder host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s =>
|
||||
{
|
||||
s.ListenAnyIP(short.Parse(Environment.GetEnvironmentVariable("LOGS_SERVER_PORT") ?? "28888"), options => { options.Protocols = HttpProtocols.Http2; });
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ namespace MailServer
|
|||
IHostBuilder host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s =>
|
||||
{
|
||||
s.ListenAnyIP(short.Parse(Environment.GetEnvironmentVariable("MAIL_SERVER_PORT") ?? "27777"), options => { options.Protocols = HttpProtocols.Http2; });
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ namespace Master
|
|||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s =>
|
||||
{
|
||||
s.ListenAnyIP(Convert.ToInt32(Environment.GetEnvironmentVariable("MASTER_PORT") ?? "20500"), options => options.Protocols = HttpProtocols.Http2);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ namespace RelationServer
|
|||
IHostBuilder host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s =>
|
||||
{
|
||||
s.ListenAnyIP(short.Parse(Environment.GetEnvironmentVariable("RELATION_SERVER_PORT") ?? "21111"), options => { options.Protocols = HttpProtocols.Http2; });
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ namespace WingsEmu.ClusterScheduler
|
|||
IHostBuilder host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s => { s.ListenAnyIP(25000); });
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -62,7 +62,7 @@ public class CreateAccountCommandHandler
|
|||
await context.Database.MigrateAsync();
|
||||
if (context.Account.Any())
|
||||
{
|
||||
Log.Info("[DEFAULT ACCOUNT] Accounts were already present!");
|
||||
Log.Info("[DEFAULT_ACCOUNT] Accounts were already present!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -84,12 +84,12 @@ public class CreateAccountCommandHandler
|
|||
Password = adminPassword.ToSha512()
|
||||
});
|
||||
await context.SaveChangesAsync();
|
||||
Log.Info("[DEFAULT ACCOUNT] Accounts created!");
|
||||
Log.Info("[DEFAULT_ACCOUNT] Accounts created!");
|
||||
return 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[DEFAULT ACCOUNT] Error", e);
|
||||
Log.Error("[DEFAULT_ACCOUNT] Error", e);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ namespace TranslationServer
|
|||
IHostBuilder host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseSetting(WebHostDefaults.ServerUrlsKey, string.Empty);
|
||||
webBuilder.ConfigureKestrel(s =>
|
||||
{
|
||||
s.ListenAnyIP(short.Parse(Environment.GetEnvironmentVariable("TRANSLATION_SERVER_PORT") ?? "19999"), options => { options.Protocols = HttpProtocols.Http2; });
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public class FamilyAchievementManager : BackgroundService, IFamilyAchievementMan
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[FamilyAchievementManager] ExecuteAsync", e);
|
||||
Log.Error("[FAMILY_ACHIEVEMENT_MANAGER] ExecuteAsync", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ public class FamilyAchievementManager : BackgroundService, IFamilyAchievementMan
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[FamilyAchievementManager] ExecuteAsync", e);
|
||||
Log.Error("[FAMILY_ACHIEVEMENT_MANAGER] ExecuteAsync", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -8,6 +8,8 @@ namespace Plugin.Database.DB.Configs
|
|||
{
|
||||
public void Configure(EntityTypeBuilder<DbBazaarItemEntity> builder)
|
||||
{
|
||||
builder.HasQueryFilter(s => s.DeletedAt == null && s.DbCharacter.DeletedAt == null);
|
||||
|
||||
builder
|
||||
.HasOne(s => s.DbCharacter)
|
||||
.WithMany(s => s.BazaarItem)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ namespace Plugin.Database.DB.Configs
|
|||
{
|
||||
builder.HasKey(s => new { s.CharacterId, s.RelatedCharacterId });
|
||||
|
||||
builder.HasQueryFilter(s => s.Source.DeletedAt == null && s.Target.DeletedAt == null);
|
||||
|
||||
builder.HasOne(s => s.Source)
|
||||
.WithMany(s => s.SourceRelations)
|
||||
.HasForeignKey(s => s.CharacterId);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -32,7 +32,7 @@ namespace Plugin.Database.Families
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[FAMILY_WAREHOUSE_ITEM_DAO][SaveAsync] ", e);
|
||||
Log.Error("[FAMILY_WAREHOUSE_ITEM_DAO][SAVE_ASYNC] ", e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ namespace Plugin.Database.Families
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[FAMILY_WAREHOUSE_ITEM_DAO][DeleteAsync] ", e);
|
||||
Log.Error("[FAMILY_WAREHOUSE_ITEM_DAO][DELETE_ASYNC] ", e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ namespace Plugin.Database.Families
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[FAMILY_WAREHOUSE_ITEM_DAO][GetByFamilyIdAsync] ", e);
|
||||
Log.Error("[FAMILY_WAREHOUSE_ITEM_DAO][GET_BY_FAMILY_ID_ASYNC] ", e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -29,7 +29,7 @@ namespace Plugin.Database.Families
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[FAMILY_WAREHOUSE_LOG_DAO][SaveAsync] ", e);
|
||||
Log.Error("[FAMILY_WAREHOUSE_LOG_DAO][SAVE_ASYNC] ", e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ namespace Plugin.Database.Families
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[FAMILY_WAREHOUSE_LOG_DAO][GetByFamilyIdAsync] ", e);
|
||||
Log.Error("[FAMILY_WAREHOUSE_LOG_DAO][GET_BY_FAMILY_ID_ASYNC] ", e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ namespace Plugin.Database.Families
|
|||
{
|
||||
builder.HasKey(s => new { s.FamilyId });
|
||||
|
||||
builder.HasQueryFilter(s => s.DeletedAt == null && s.Family.DeletedAt == null);
|
||||
|
||||
builder.HasOne(s => s.Family)
|
||||
.WithOne(s => s.WarehouseLogs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Plugin.Database.Warehouse
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[ACCOUNT_WAREHOUSE_ITEM_DAO][SaveAsync] ", e);
|
||||
Log.Error("[ACCOUNT_WAREHOUSE_ITEM_DAO][SAVE_ASYNC] ", e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ namespace Plugin.Database.Warehouse
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[ACCOUNT_WAREHOUSE_ITEM_DAO][DeleteAsync] ", e);
|
||||
Log.Error("[ACCOUNT_WAREHOUSE_ITEM_DAO][DELETE_ASYNC] ", e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ namespace Plugin.Database.Warehouse
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[ACCOUNT_WAREHOUSE_ITEM_DAO][GetByFamilyIdAsync] ", e);
|
||||
Log.Error("[ACCOUNT_WAREHOUSE_ITEM_DAO][GET_BY_FAMILY_ID_ASYNC] ", e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using MongoDB.Bson.Serialization;
|
||||
using MongoDB.Bson.Serialization.Conventions;
|
||||
using MongoDB.Bson.Serialization.Serializers;
|
||||
using PhoenixLib.Logging;
|
||||
using PhoenixLib.ServiceBus.Extensions;
|
||||
using Plugin.MongoLogs.Services;
|
||||
|
|
@ -34,6 +36,16 @@ namespace Plugin.MongoLogs.Extensions
|
|||
|
||||
public static void AddMongoLogsPlugin(this IServiceCollection services)
|
||||
{
|
||||
// Allow serialization of plugin log entities that are passed as object through generic logging pipeline.
|
||||
try
|
||||
{
|
||||
BsonSerializer.RegisterSerializer(new ObjectSerializer(_ => true));
|
||||
}
|
||||
catch
|
||||
{
|
||||
// serializer may already be registered by another startup path
|
||||
}
|
||||
|
||||
var pack = new ConventionPack
|
||||
{
|
||||
new TypedIgnoreDefaultPropertiesConvention<ItemInstanceDTO>()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using PhoenixLib.Caching;
|
||||
|
|
@ -49,7 +49,7 @@ public class BazaarManager : IBazaarManager
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[BAZAAR_MANAGER][GetCharacterName] Unexpected error:", e);
|
||||
Log.Error("[BAZAAR_MANAGER][GET_CHARACTER_NAME] Unexpected error:", e);
|
||||
}
|
||||
|
||||
if (response?.RpcResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -74,7 +74,7 @@ public class BazaarManager : IBazaarManager
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[BAZAAR_MANAGER][GetBazaarItemById] Unexpected error:", e);
|
||||
Log.Error("[BAZAAR_MANAGER][GET_BAZAAR_ITEM_BY_ID] Unexpected error:", e);
|
||||
}
|
||||
|
||||
if (response?.ResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -98,7 +98,7 @@ public class BazaarManager : IBazaarManager
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[BAZAAR_MANAGER][GetListedItemsByCharacterId]", e);
|
||||
Log.Error("[BAZAAR_MANAGER][GET_LISTED_ITEMS_BY_CHARACTER_ID]", e);
|
||||
}
|
||||
|
||||
if (response?.ResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -121,7 +121,7 @@ public class BazaarManager : IBazaarManager
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[BAZAAR_MANAGER][GetListedItemsByCharacterId]", e);
|
||||
Log.Error("[BAZAAR_MANAGER][GET_LISTED_ITEMS_BY_CHARACTER_ID]", e);
|
||||
}
|
||||
|
||||
if (response == null)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using PhoenixLib.Events;
|
||||
|
|
@ -58,19 +58,19 @@ public class PlayerChangeChannelAct4EventHandler : IAsyncEventProcessor<PlayerCh
|
|||
SerializableGameServer gameServer = response?.GameServer;
|
||||
if (response?.ResponseType != RpcResponseType.SUCCESS)
|
||||
{
|
||||
Log.Error("[GetAct4ChannelInfoRequest] Response type is not success.", new Exception());
|
||||
Log.Error("[GET_ACT4_CHANNEL_INFO_REQUEST] Response type is not success.", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
if (gameServer == null)
|
||||
{
|
||||
Log.Error("[GetAct4ChannelInfoRequest] Game server is null.", new Exception());
|
||||
Log.Error("[GET_ACT4_CHANNEL_INFO_REQUEST] Game server is null.", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
if (gameServer.ChannelId == _gameServer.ChannelId)
|
||||
{
|
||||
Log.Error("[GetAct4ChannelInfoRequest] It's the same channel id.", new Exception());
|
||||
Log.Error("[GET_ACT4_CHANNEL_INFO_REQUEST] It's the same channel id.", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -83,7 +83,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'penaltyinfo'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_PENALTYINFO] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
if (response?.ResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -256,7 +256,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'ban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_BAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
if (response?.ResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -278,7 +278,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'ban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_BAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
if (targetResponse?.RpcResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -305,7 +305,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'ban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_BAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
return response2?.ResponseType != RpcResponseType.SUCCESS
|
||||
|
|
@ -347,7 +347,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'ban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_BAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
if (response?.ResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -369,7 +369,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'ban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_BAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
if (targetResponse?.RpcResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -397,7 +397,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'ban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_BAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
return response2?.ResponseType != RpcResponseType.SUCCESS
|
||||
|
|
@ -419,7 +419,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'unban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_UNBAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
if (targetResponse?.RpcResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -439,7 +439,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'unban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_UNBAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
if (response?.ResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -462,7 +462,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'unban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_UNBAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
return saveResponse?.ResponseType != RpcResponseType.SUCCESS
|
||||
|
|
@ -484,7 +484,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'unban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_UNBAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
if (targetResponse?.RpcResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -504,7 +504,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'unban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_UNBAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
if (response?.ResponseType != RpcResponseType.SUCCESS)
|
||||
|
|
@ -525,7 +525,7 @@ public class PunishmentModule : SaltyModuleBase
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("[PUNISHMENT_MODULE][Command: 'ban'] Unexpected error: ", e);
|
||||
Log.Error("[PUNISHMENT_MODULE][COMMAND_BAN] Unexpected error: ", e);
|
||||
}
|
||||
|
||||
return saveResponse?.ResponseType != RpcResponseType.SUCCESS
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace WingsEmu.Plugins.GameEvents.EventHandler.Global
|
|||
_ => null
|
||||
};
|
||||
|
||||
Log.Debug("[GameEvent] Locked Registration for Event: " + e.Type);
|
||||
Log.Debug("[GAME_EVENT] Locked Registration for Event: " + e.Type);
|
||||
|
||||
_sessionManager.Broadcast(x =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace WingsEmu.Plugins.GameEvents.EventHandler.Global
|
|||
|
||||
public async Task HandleAsync(GameEventMatchmakeEvent e, CancellationToken cancellation)
|
||||
{
|
||||
Log.Debug("[GameEvent] Processing matchmaking for Event: " + e.Type);
|
||||
Log.Debug("[GAME_EVENT] Processing matchmaking for Event: " + e.Type);
|
||||
FilterResult filterResult = _matchmaking.Filter(e.Sessions, new InBaseMapFilter());
|
||||
TellToRefusedSessions(filterResult.RefusedSessions);
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace WingsEmu.Plugins.GameEvents.EventHandler.Global
|
|||
}
|
||||
|
||||
GameEventType type = e.Type;
|
||||
Log.Debug("[GameEvent] Preparing Event: " + type);
|
||||
Log.Debug("[GAME_EVENT] Preparing Event: " + type);
|
||||
|
||||
if (e.NoDelay)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue