xmidt-org / tr1d1um

Tr1d1um is the Webpa micro-service that encode TR-181 requests.
Apache License 2.0
12 stars 12 forks source link

normalize mac addresses in logging #554

Open ilawjr opened 1 month ago

ilawjr commented 1 month ago

Version: 0.9.13-1

Description: We should normalize how we log mac addresses (deviceid log field). This will simplify log ingestion and search in elasticsearch. Depending on how a user requests a mac, we can log mac addresses in at least 3 different ways:

"deviceid":"mac:112233445566"
"deviceid":"mac:11-22-33-44-55-66"
"deviceid":"mac:11:22:33:44:55:66"

We also log according to the case provided by the user:

""deviceid":"mac:11:22:33:44:55:bB"

We should log mac addresses in one unified way. For example, we could remove all delimiters and change to lower case

mac:1122334455bb