mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-18 16:17:03 +00:00
feat(GODT-2639): Enhance sentry init log.
This commit is contained in:
@ -49,7 +49,7 @@ QString sentryAttachmentFilePath() {
|
|||||||
//****************************************************************************************************************************************************
|
//****************************************************************************************************************************************************
|
||||||
QByteArray getProtectedHostname() {
|
QByteArray getProtectedHostname() {
|
||||||
QByteArray hostname = QCryptographicHash::hash(QSysInfo::machineHostName().toUtf8(), QCryptographicHash::Sha256);
|
QByteArray hostname = QCryptographicHash::hash(QSysInfo::machineHostName().toUtf8(), QCryptographicHash::Sha256);
|
||||||
return hostname.toHex();
|
return hostname.toBase64();
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************************************************************************************************************
|
//****************************************************************************************************************************************************
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
#include <sentry.h>
|
#include <sentry.h>
|
||||||
|
|
||||||
void initSentry();
|
void initSentry();
|
||||||
|
QByteArray getProtectedHostname();
|
||||||
void setSentryReportScope();
|
void setSentryReportScope();
|
||||||
sentry_options_t* newSentryOptions(const char * sentryDNS, const char * cacheDir);
|
sentry_options_t* newSentryOptions(const char * sentryDNS, const char * cacheDir);
|
||||||
sentry_uuid_t reportSentryEvent(sentry_level_t level, const char *message);
|
sentry_uuid_t reportSentryEvent(sentry_level_t level, const char *message);
|
||||||
|
|||||||
@ -305,6 +305,8 @@ int main(int argc, char *argv[]) {
|
|||||||
// When not in attached mode, log entries are forwarded to bridge, which output it on stdout/stderr. bridge-gui's process monitor intercept
|
// 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.
|
// these outputs and output them on the command-line.
|
||||||
log.setLevel(cliOptions.logLevel);
|
log.setLevel(cliOptions.logLevel);
|
||||||
|
log.info(QString("New Sentry reporter - id: %1.").arg(getProtectedHostname()));
|
||||||
|
|
||||||
QString bridgeexec;
|
QString bridgeexec;
|
||||||
if (!cliOptions.attach) {
|
if (!cliOptions.attach) {
|
||||||
if (isBridgeRunning()) {
|
if (isBridgeRunning()) {
|
||||||
|
|||||||
@ -96,6 +96,7 @@ func GetTimeZone() string {
|
|||||||
|
|
||||||
// NewReporter creates new sentry reporter with appName and appVersion to report.
|
// NewReporter creates new sentry reporter with appName and appVersion to report.
|
||||||
func NewReporter(appName string, identifier Identifier) *Reporter {
|
func NewReporter(appName string, identifier Identifier) *Reporter {
|
||||||
|
logrus.WithField("id", GetProtectedHostname()).Info("New sentry reporter")
|
||||||
return &Reporter{
|
return &Reporter{
|
||||||
appName: appName,
|
appName: appName,
|
||||||
appVersion: constants.Revision,
|
appVersion: constants.Revision,
|
||||||
|
|||||||
Reference in New Issue
Block a user