3 ms·
Imo json gives you the most flexibility and adds as much metadata the developer (applocation side) and ops (in case you use an orchestratiom such as kubernetes,
by geoah 10y ago
Imo json gives you the most flexibility and adds as much metadata the developer (applocation side) and ops (in case you use an orchestratiom such as kubernetes, etc) need.
Eg in kubernetes it's pretty common for applocations to log everything in json, kubernetes will then wrap the app logs in another layer of json that includes information about the container name, id, host ip, etc.
Microservices and containers will most likely require you to have some centralized way to view your logs (kibana etc) so ops and devs can create their own views.
Even in the basic case of tailing log files you can use a jq alias with a custom format to convert the json logs to something colorful and readable.
Ps. On mobile so i apologise for possible mistakes