Logging enhancements and correctly dial local syslog
The previous iteration on logging did not properly establishes a connection to a log daemon. This led to working logging during initial testing but issues on more traditional test systems. To address this we've properly leveraged: https://golang.org/pkg/log/syslog/#Dial
Additional configuration has been introduced to account for remote logging and the potential of logging to a single static file on the test system.
At this time logging is still only focused on the jacamar-auth
application and through the usage of a Logrus object passed to the related packages. Please note there are options for global log configuration; however, it has not been able to account for the static per-job fields required:
{
"ci-stage": "config_exec",
"hostname": "d4823d777e23",
"jacamar-name": "test",
"jobID": "123",
"level": "info",
"msg": "User user authorized for CI job execution.",
"processID": 2608,
"runner-short": "token123",
"time": "2021-06-04T20:18:29Z"
}
Edited by Paul Bryant