summaryrefslogtreecommitdiff
path: root/website/src/docs/developers
diff options
context:
space:
mode:
authorSho Sakuma <me@m1sk9.dev>2026-08-30 20:55:48 +0900
committerSho Sakuma <me@m1sk9.dev>2026-08-30 20:55:48 +0900
commit6eadc66f4ac9bf626e3649da9a3402dec35c7ba6 (patch)
tree8d40191f47604a0421043fb383256fe38356a001 /website/src/docs/developers
parent44132f3a73651fbd334a314fbc4ab47f5f1bbd5b (diff)
downloadLunaticChat-6eadc66f4ac9bf626e3649da9a3402dec35c7ba6.tar.gz
LunaticChat-6eadc66f4ac9bf626e3649da9a3402dec35c7ba6.tar.bz2
LunaticChat-6eadc66f4ac9bf626e3649da9a3402dec35c7ba6.zip
docs: Add v1.4.0 doc
Diffstat (limited to 'website/src/docs/developers')
-rw-r--r--website/src/docs/developers/engine.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/website/src/docs/developers/engine.md b/website/src/docs/developers/engine.md
index a65a3f6..1f8956a 100644
--- a/website/src/docs/developers/engine.md
+++ b/website/src/docs/developers/engine.md
@@ -79,6 +79,17 @@ There are two UUID serializers because they serve different purposes. `UUIDSeria
So that Paper and Velocity can handle domain errors as the same types, exceptions are centralized in `engine`. There is no common sealed base — it is a flat structure that directly extends `Exception`. They fall into existence/reference, state, limit, and permission/BAN/KICK categories, and many take `playerId` / `channelId` / `limit` in the constructor and build their own messages. Because there is no base type, callers are expected to catch each individually.
+## debug — One switch both platforms read
+
+Debug logging is a contract before it is an implementation: `config.yml` and the proxy's system property must mean the same thing by `velocity,protocol`, and a category added on one side must exist on the other. So the vocabulary lives here and only the writing is left to the platforms.
+
+- `DebugCategory` — the areas that can be logged, each carrying the `key` operators write
+- `DebugCategories.parse` / `resolve` — the one reading of a debug switch, shared by `DebugConfigSerializer` on Paper and `VelocityDebugSwitch` on Velocity. An unknown name is collected rather than thrown, so a typo costs only itself
+- `DebugLogger` — `log(category) { message }`. The lambda is the point: the chat path is instrumented once per message, and while debugging is off the string is never built
+- `DebugState` — the categories currently on, replaceable at runtime by `/lc reload` and `/lc debug`
+
+`JulDebugLogger` (Paper) and `Slf4jDebugLogger` (Velocity) both write at `INFO`, because neither platform's stock logging configuration prints anything below it.
+
## permission / command — Neutral abstractions
Permissions and command results are placed in `engine` as neutral representations that can be passed to either the Bukkit or Velocity API.