mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-05-30 15:42:25 +00:00
⬆️ Update MoonBit Version to v0.9.2 and Fix warns
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
async test "shutdown drains pending records" {
|
||||
inspect(async_runtime_mode_label(async_runtime_mode()) == "native_worker" || async_runtime_mode_label(async_runtime_mode()) == "compatibility", content="true")
|
||||
let written : Ref[Array[String]] = Ref::new([])
|
||||
let flushes : Ref[Int] = Ref::new(0)
|
||||
let written : Ref[Array[String]] = Ref([])
|
||||
let flushes : Ref[Int] = Ref(0)
|
||||
let logger = async_logger(
|
||||
@bitlogger.callback_sink(fn(rec) {
|
||||
written.val.push(rec.message)
|
||||
@@ -212,7 +212,7 @@ test "async logger state snapshot reflects current counters and runtime" {
|
||||
}
|
||||
|
||||
async test "run drains queued records in compatibility backends too" {
|
||||
let written : Ref[Array[String]] = Ref::new([])
|
||||
let written : Ref[Array[String]] = Ref([])
|
||||
let logger = async_logger(
|
||||
@bitlogger.callback_sink(fn(rec) {
|
||||
written.val.push(rec.message)
|
||||
@@ -244,9 +244,9 @@ async test "run drains queued records in compatibility backends too" {
|
||||
}
|
||||
|
||||
async test "library async logger keeps a smaller async facade" {
|
||||
let written_targets : Ref[Array[String]] = Ref::new([])
|
||||
let written_messages : Ref[Array[String]] = Ref::new([])
|
||||
let written_field_counts : Ref[Array[Int]] = Ref::new([])
|
||||
let written_targets : Ref[Array[String]] = Ref([])
|
||||
let written_messages : Ref[Array[String]] = Ref([])
|
||||
let written_field_counts : Ref[Array[Int]] = Ref([])
|
||||
let logger = LibraryAsyncLogger::new(
|
||||
@bitlogger.callback_sink(fn(rec) {
|
||||
written_targets.val.push(rec.target)
|
||||
|
||||
@@ -323,12 +323,12 @@ pub fn[S] async_logger(
|
||||
filter: fn(_) { true },
|
||||
patch: @bitlogger.identity_patch(),
|
||||
queue: @async.Queue(kind=queue_kind_of(config)),
|
||||
pending_count: Ref::new(0),
|
||||
dropped_count: Ref::new(0),
|
||||
is_closed: Ref::new(false),
|
||||
is_running: Ref::new(false),
|
||||
has_failed: Ref::new(false),
|
||||
last_error: Ref::new(""),
|
||||
pending_count: Ref(0),
|
||||
dropped_count: Ref(0),
|
||||
is_closed: Ref(false),
|
||||
is_running: Ref(false),
|
||||
has_failed: Ref(false),
|
||||
last_error: Ref(""),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user