File 6772-logger-Ensure-order-for-get_handler_config-0-and-get.patch of Package erlang

From b27196b6cde54ecaec6de743519c55841cf578a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org>
Date: Mon, 17 Nov 2025 11:12:34 +0100
Subject: [PATCH] logger: Ensure order for get_handler_config/0 and
 get_handler_ids/0

---
 lib/kernel/src/logger.erl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/kernel/src/logger.erl b/lib/kernel/src/logger.erl
index 6bc993eec7..7a83e0fd39 100644
--- a/lib/kernel/src/logger.erl
+++ b/lib/kernel/src/logger.erl
@@ -567,14 +567,15 @@ filter_config(#{module:=Module}=Config) ->
 -spec get_handler_config() -> [Config] when
       Config :: handler_config().
 get_handler_config() ->
-    Configs = logger_config:get(?LOGGER_TABLE),
-    [filter_config(Config) || Config <- Configs].
+    Configs0 = logger_config:get(?LOGGER_TABLE),
+    Configs = [filter_config(Config) || Config <- Configs0],
+    lists:sort(fun(#{ id := LHS }, #{ id := RHS }) -> LHS =< RHS end, Configs).
 
 -spec get_handler_ids() -> [HandlerId] when
       HandlerId :: handler_id().
 get_handler_ids() ->
     {ok,#{handlers:=HandlerIds}} = logger_config:get(?LOGGER_TABLE,primary),
-    HandlerIds.
+    lists:sort(HandlerIds).
 
 -spec get_proxy_config() -> Config when
       Config :: olp_config().
-- 
2.51.0

openSUSE Build Service is sponsored by