summaryrefslogtreecommitdiffstats
path: root/net/prplmesh/patches/160-production-log-levels.patch
blob: cd5a5055b2a20b5fc7aaa77bda9e12cea98c1d47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From 6da943b44dee4dc3cc51d4b4b1dfc7c68069b9e5 Mon Sep 17 00:00:00 2001
From: Andrei Ovcharenko <a@krot.name>
Date: Wed, 29 Jul 2026 21:05:00 +0300
Subject: [PATCH] logging: use production levels by default

Debug and trace logging make normal link-metrics traffic dominate the
controller log on stock OpenWrt. Keep informational, warning, error and
fatal diagnostics, while leaving verbose levels available for an
explicit troubleshooting session.

Apply the same production default to file and syslog output for both the
controller and agent so enabling syslog later cannot reintroduce the
same amplification.

The whole series is publicly reviewable at
https://gitlab.com/kreout/prpl-mesh-mercusys/-/merge_requests/1; the
upstream GitLab only accepts merge requests from project members, so
the upstream submission itself goes through the prpl Foundation Jira.

Signed-off-by: Andrei Ovcharenko <a@krot.name>
---

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -238,7 +238,7 @@ set(BEEROCKS_LOG_FILES_AUTO_ROLL "true"
 set(BEEROCKS_LOG_STDOUT_ENABLED  "false" CACHE STRING "Print logs to stdout")
 set(BEEROCKS_LOG_SYSLOG_ENABLED  "true" CACHE STRING "Send logs to syslog")
 #full ascending list: trace, debug, info, warning, error, fatal
-set(BEEROCKS_SYSLOG_LEVEL_LIST   "error,fatal" CACHE STRING "Syslog level list")
+set(BEEROCKS_SYSLOG_LEVEL_LIST   "error,info,warning,fatal" CACHE STRING "Syslog level list")
 if (TARGET_PLATFORM STREQUAL "linux")
     set(BEEROCKS_CONTROLLER_LOG_SIZE "30000000" CACHE STRING "Max controller log size")
     set(BEEROCKS_AGENT_LOG_SIZE "2000000" CACHE STRING "Max agent log size")
--- a/agent/config/beerocks_agent.conf.in
+++ b/agent/config/beerocks_agent.conf.in
@@ -93,7 +93,7 @@ em_handle_third_party=0
 
 [log]
 #full ascending list: trace, debug, info, warning, error, fatal
-log_global_levels=error,info,warning,fatal,trace,debug
+log_global_levels=error,info,warning,fatal
 log_global_syslog_levels=@BEEROCKS_SYSLOG_LEVEL_LIST@
 log_global_size=@BEEROCKS_AGENT_LOG_SIZE@
 log_files_enabled=@BEEROCKS_LOG_FILES_ENABLED@
--- a/controller/config/beerocks_controller.conf.in
+++ b/controller/config/beerocks_controller.conf.in
@@ -57,7 +57,7 @@ use_dataelements_vap_configs=@BEEROCKS_C
 
 [log]
 #full ascending list: trace, debug, info, warning, error, fatal
-log_global_levels=error,info,warning,fatal,trace,debug
+log_global_levels=error,info,warning,fatal
 log_global_syslog_levels=@BEEROCKS_SYSLOG_LEVEL_LIST@
 log_global_size=@BEEROCKS_CONTROLLER_LOG_SIZE@
 log_files_enabled=@BEEROCKS_LOG_FILES_ENABLED@