Skip to main content

Logging setup for deployment

GlobalDcc uses Serilog to output logs using a json format. The advantage of having log output in json format is that it makes it convenient for certain search engines specialized for logs to perform their actions. Examples of logs can be found here. Pods of gdcc-dev-api should represent their logs in json format.

Serilog

Serilog is a well maintained highly used C# library that offers logging solutions, and it offers a json formatter. This makes it a good choice for our use case.

Implementation

In deployment the configuration is provided by the appsettings.json file. The file will be generated by the Helm charts inside the deployment pods. See also Helm Charts

The specific chart responsible in this case is charts/globaldcc/templates/api/configmap.yaml. In addition to the above referenced steps, gdcc_helm_ci pipeline should also be executed. In Transport-ArgoCD, inside the file dev/apps/team-r/global-dcc.yaml there is a source for helm/globaldcc. The targetRevision should be updated to fit the number from the gdcc_helm_ci pipeline.