📝 align async write examples

This commit is contained in:
Nanaloveyuki
2026-06-14 00:12:51 +08:00
parent dae9d38a3f
commit e035625fc1
8 changed files with 32 additions and 32 deletions
+4 -4
View File
@@ -2,8 +2,8 @@
name: library-async-logger-error
group: api
category: facade
update-time: 20260613
description: Enqueue an error-level record through a LibraryAsyncLogger facade using the highest built-in severity shortcut.
update-time: 20260614
description: Enqueue an error-level record through a LibraryAsyncLogger facade using the highest built-in severity shortcut and the repo's direct async call style.
key-word:
- async
- library
@@ -52,7 +52,7 @@ Here are some specific examples provided.
When an operation should emit a high-severity failure event:
```moonbit
await logger.error("worker execution failed")
logger.error("worker execution failed")
```
In this example, failure intent is explicit at the call site.
@@ -61,7 +61,7 @@ In this example, failure intent is explicit at the call site.
When an error event should include diagnostic fields:
```moonbit
await logger.error(
logger.error(
"dispatch failed",
fields=[@bitlogger.field("job_id", "42")],
)