mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
GODT-1816: Connect Gluon Logs to bridge Logs
Ensure the IMAP commands and SMTP commands are logged to trace channels with an entry so they are recognizable as before.
This commit is contained in:
committed by
James Houlahan
parent
03e14154a6
commit
f01c70e506
@ -3,6 +3,7 @@ package app
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"github.com/urfave/cli/v2"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
@ -25,7 +26,7 @@ import (
|
||||
|
||||
const vaultSecretName = "bridge-vault-key"
|
||||
|
||||
func newBridge(locations *locations.Locations, identifier *useragent.UserAgent) (*bridge.Bridge, error) {
|
||||
func newBridge(c *cli.Context, locations *locations.Locations, identifier *useragent.UserAgent) (*bridge.Bridge, error) {
|
||||
// Create the underlying dialer used by the bridge.
|
||||
// It only connects to trusted servers and reports any untrusted servers it finds.
|
||||
pinningDialer := dialer.NewPinningTLSDialer(
|
||||
@ -92,6 +93,9 @@ func newBridge(locations *locations.Locations, identifier *useragent.UserAgent)
|
||||
autostarter,
|
||||
updater,
|
||||
version,
|
||||
c.String(flagLogIMAP) == "client" || c.String(flagLogIMAP) == "all",
|
||||
c.String(flagLogIMAP) == "server" || c.String(flagLogIMAP) == "all",
|
||||
c.Bool(flagLogSMTP),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not create bridge: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user