From 361d32c9c443f3b89d5a5278a0b2e0268ed8622f Mon Sep 17 00:00:00 2001 From: Dag Brattli Date: Sat, 28 Mar 2026 20:56:05 +0100 Subject: [PATCH] fix: use Atom type for set_primary_config key parameter Erlang's logger:set_primary_config/2 expects atoms for both key and value. A string compiles to a binary (<<"level">>) which Erlang silently ignores. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/otp/Logger.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/otp/Logger.fs b/src/otp/Logger.fs index eb09c30..113f229 100644 --- a/src/otp/Logger.fs +++ b/src/otp/Logger.fs @@ -41,8 +41,8 @@ type IExports = abstract debug: msg: string -> unit /// Log a debug message with metadata or format args. abstract debug: msg: string * metadataOrArgs: obj -> unit - /// Set the primary logger configuration. Common use: set_primary_config("level", atom) - abstract set_primary_config: key: string * value: Atom -> unit + /// Set the primary logger configuration. Common use: set_primary_config(atom "level", atom "debug") + abstract set_primary_config: key: Atom * value: Atom -> unit /// Add a primary filter. Filters run before handler filters and can stop or modify events. /// The filter is a tuple {FilterFun, Extra} where FilterFun is fun(LogEvent, Extra) -> stop | ignore | LogEvent. abstract add_primary_filter: id: Atom * filter: (System.Func * obj) -> unit