mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-18 16:17:03 +00:00
feat(GODT-2705): added log entries for focus service on client and server sides.
(cherry picked from commit ae65385c38)
This commit is contained in:
committed by
Xavier Michelon
parent
bac4b90c1d
commit
60de00c73f
@ -196,7 +196,7 @@ bool isBridgeRunning() {
|
||||
//****************************************************************************************************************************************************
|
||||
void focusOtherInstance() {
|
||||
try {
|
||||
FocusGRPCClient client;
|
||||
FocusGRPCClient client(app().log());
|
||||
GRPCConfig sc;
|
||||
QString const path = FocusGRPCClient::grpcFocusServerConfigPath(bridgepp::userConfigDir());
|
||||
QFile file(path);
|
||||
@ -209,7 +209,6 @@ void focusOtherInstance() {
|
||||
throw Exception("Server did not provide gRPC Focus service configuration.");
|
||||
}
|
||||
|
||||
|
||||
QString error;
|
||||
if (!client.connectToServer(5000, sc.port, &error)) {
|
||||
throw Exception("Could not connect to bridge focus service for a raise call.", error);
|
||||
@ -286,7 +285,9 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
initQtApplication();
|
||||
|
||||
CommandLineOptions const cliOptions = parseCommandLine(argc, argv);
|
||||
Log &log = initLog();
|
||||
log.setLevel(cliOptions.logLevel);
|
||||
|
||||
QLockFile lock(bridgepp::userCacheDir() + "/" + bridgeGUILock);
|
||||
if (!checkSingleInstance(lock)) {
|
||||
@ -294,8 +295,6 @@ int main(int argc, char *argv[]) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
CommandLineOptions const cliOptions = parseCommandLine(argc, argv);
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
registerSecondInstanceHandler();
|
||||
setDockIconVisibleState(!cliOptions.noWindow);
|
||||
@ -304,7 +303,6 @@ int main(int argc, char *argv[]) {
|
||||
// In attached mode, we do not intercept stderr and stdout of bridge, as we did not launch it ourselves, so we output the log to the console.
|
||||
// When not in attached mode, log entries are forwarded to bridge, which output it on stdout/stderr. bridge-gui's process monitor intercept
|
||||
// these outputs and output them on the command-line.
|
||||
log.setLevel(cliOptions.logLevel);
|
||||
log.info(QString("New Sentry reporter - id: %1.").arg(getProtectedHostname()));
|
||||
|
||||
QString bridgeexec;
|
||||
|
||||
Reference in New Issue
Block a user