Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created fine-grained FA definitions #1496

Merged
merged 6 commits into from
Aug 27, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions apps/logsupport_appdefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,39 @@
LogFANames::LogFANames()
{
Install("GENERAL", SRT_LOGFA_GENERAL);

Install("CONTROL", SRT_LOGFA_CONTROL);
Install("DATA", SRT_LOGFA_DATA);
Install("SOCKMGMT", SRT_LOGFA_SOCKMGMT);
Install("CONN", SRT_LOGFA_CONN);
Install("XTIMER", SRT_LOGFA_XTIMER);
Install("TSBPD", SRT_LOGFA_TSBPD);
Install("REXMIT", SRT_LOGFA_REXMIT);
Install("RSRC", SRT_LOGFA_RSRC);

Install("CONGEST", SRT_LOGFA_CONGEST);
Install("PFILTER", SRT_LOGFA_PFILTER);

Install("API_CTRL", SRT_LOGFA_API_CTRL);

Install("QUE_CTRL", SRT_LOGFA_QUE_CTRL);

Install("EPOLL_UPD", SRT_LOGFA_EPOLL_UPD);

Install("API_RECV", SRT_LOGFA_API_RECV);
Install("BUF_RECV", SRT_LOGFA_BUF_RECV);
Install("QUE_RECV", SRT_LOGFA_QUE_RECV);
Install("CHN_RECV", SRT_LOGFA_CHN_RECV);
Install("GRP_RECV", SRT_LOGFA_GRP_RECV);

Install("API_SEND", SRT_LOGFA_API_SEND);
Install("BUF_SEND", SRT_LOGFA_BUF_SEND);
Install("QUE_SEND", SRT_LOGFA_QUE_SEND);
Install("CHN_SEND", SRT_LOGFA_CHN_SEND);
Install("GRP_SEND", SRT_LOGFA_GRP_SEND);

Install("INTERNAL", SRT_LOGFA_INTERNAL);

Install("QUE_MGMT", SRT_LOGFA_QUE_MGMT);
Install("CHN_MGMT", SRT_LOGFA_CHN_MGMT);
Install("GRP_MGMT", SRT_LOGFA_GRP_MGMT);
Install("EPOLL_API", SRT_LOGFA_EPOLL_API);
Install("HAICRYPT", SRT_LOGFA_HAICRYPT);
Install("APPLOG", SRT_LOGFA_APPLOG);
}
2 changes: 1 addition & 1 deletion haicrypt/haicrypt_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
extern srt_logging::LogConfig srt_logger_config;

// LOGFA symbol defined in srt.h
srt_logging::Logger hclog(SRT_LOGFA_HAICRYPT, srt_logger_config, "SRT.k");
srt_logging::Logger hclog(SRT_LOGFA_HAICRYPT, srt_logger_config, "SRT.hc");

extern "C" {

Expand Down
41 changes: 32 additions & 9 deletions scripts/generate-logging-defs.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,43 @@ set model {
# Use values greater than 0. Value 0 is reserved for LOGFA_GENERAL,
# which is considered always enabled.
set loggers {
GENERAL g 0
CONTROL mg 2
DATA d 3
TSBPD ts 4
REXMIT rx 5
CONGEST cc 7
GENERAL gg 0
SOCKMGMT sm 1
CONN ca 2
XTIMER xt 3
TSBPD ts 4
RSRC rs 5
CONGEST cc 7
PFILTER pf 8
API_CTRL ac 11
QUE_CTRL qc 13
EPOLL_UPD ei 16

API_RECV ar 21
BUF_RECV br 22
QUE_RECV qr 23
CHN_RECV kr 24
GRP_RECV gr 25

API_SEND as 31
BUF_SEND bs 32
QUE_SEND qs 33
CHN_SEND ks 34
GRP_SEND gs 35

INTERNAL ip 41
QUE_MGMT qm 43
CHN_MGMT cm 44
GRP_MGMT gm 45
EPOLL_API ea 46
}

set hidden_loggers {
# Haicrypt logging - usually off.
HAICRYPT hc 6

# APPLOG=10 - defined in apps, this is only a stub to lock the value
# APPLOG ap 10
# defined in apps, this is only a stub to lock the value
APPLOG ap 10
}

set globalheader {
Expand Down
Loading