software/ors-amarisoft: enb.jinja2.cfg: Unify logging
- Currently we have separate log_options for LTE and NR cases with listing different subsystems in each. But in MultiRU one enb will be driving both LTE and NR cells at the same time, so we will need to define both LTE- and NR-related levels.
-> Merge all log settings into one log_options as a preparatory step
For current state it does not hurt for an LTE if we set e.g. ngap.level, and it does not hurt for NR if we set e.g. s1ap.level - since those layers will be unused. This way merging log settings for both LTE and NR subsystems is ok.
- Factorize log_phy_debug handling: instead of duplicating whole log_options line and changing only phy.level settings there, construct the log_options line programmatically and handle phy.level on its own.
- Use log/enb.log log_filename for both LTE and NR cases. In the upcoming MultiRU there might be several cells activated at the same time and in general it will be not possible to say are we doing "enb" or "gnb" now - for example if there will be two cells - one LTE and one NR.
-> Use enb.log for log filename uniformly similarly to how the software is named (lteenb) even though it can work as both enb and gnb.
For the reference we do the same with enb.xlog in !1522 (merged) .
/cc @jhuge, @lu.xu, @tomo, @xavier_thompson, @Daetalus
Appendix. Diff for rendered enb.cfg and gnb.cfg before and after this patch
$ git diff --no-index config/{old,out}
diff --git a/config/old/enb.cfg b/config/out/enb.cfg
index 467bb6364..1843e0f24 100644
--- a/config/old/enb.cfg
+++ b/config/out/enb.cfg
@@ -3,9 +3,7 @@
{
-
- log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
-
+ log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
log_filename: "log/enb.log",
diff --git a/config/old/gnb.cfg b/config/out/gnb.cfg
index 18523818a..d76b45d3c 100644
--- a/config/old/gnb.cfg
+++ b/config/out/gnb.cfg
@@ -3,10 +3,8 @@
{
-
- log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
-
- log_filename: "log/gnb.log",
+ log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
+ log_filename: "log/enb.log",
rf_driver: {