forked from Silverfish/proton-bridge
feat(GODT-2639): Enhance sentry init log.
This commit is contained in:
@ -49,7 +49,7 @@ QString sentryAttachmentFilePath() {
|
||||
//****************************************************************************************************************************************************
|
||||
QByteArray getProtectedHostname() {
|
||||
QByteArray hostname = QCryptographicHash::hash(QSysInfo::machineHostName().toUtf8(), QCryptographicHash::Sha256);
|
||||
return hostname.toHex();
|
||||
return hostname.toBase64();
|
||||
}
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include <sentry.h>
|
||||
|
||||
void initSentry();
|
||||
QByteArray getProtectedHostname();
|
||||
void setSentryReportScope();
|
||||
sentry_options_t* newSentryOptions(const char * sentryDNS, const char * cacheDir);
|
||||
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
|
||||
// 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;
|
||||
if (!cliOptions.attach) {
|
||||
if (isBridgeRunning()) {
|
||||
|
||||
@ -96,6 +96,7 @@ func GetTimeZone() string {
|
||||
|
||||
// NewReporter creates new sentry reporter with appName and appVersion to report.
|
||||
func NewReporter(appName string, identifier Identifier) *Reporter {
|
||||
logrus.WithField("id", GetProtectedHostname()).Info("New sentry reporter")
|
||||
return &Reporter{
|
||||
appName: appName,
|
||||
appVersion: constants.Revision,
|
||||
|
||||
Reference in New Issue
Block a user