mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-07 19:40:30 +08:00
TUN-3471: Add structured log context to logs
This commit is contained in:
committed by
Arég Harutyunyan
parent
abab78730d
commit
55bf904689
@@ -93,11 +93,16 @@ func (sc *subcommandContext) client() (tunnelstore.Client, error) {
|
||||
|
||||
func (sc *subcommandContext) credential() (*userCredential, error) {
|
||||
if sc.userCredential == nil {
|
||||
originCertPath, err := findOriginCert(sc.c, sc.log)
|
||||
originCertPath := sc.c.String("origincert")
|
||||
originCertLog := sc.log.With().
|
||||
Str(LogFieldOriginCertPath, originCertPath).
|
||||
Logger()
|
||||
|
||||
originCertPath, err := findOriginCert(originCertPath, &originCertLog)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "Error locating origin cert")
|
||||
}
|
||||
blocks, err := readOriginCert(originCertPath, sc.log)
|
||||
blocks, err := readOriginCert(originCertPath)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "Can't read origin cert from %s", originCertPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user