Skip to content

Commit

Permalink
chore_: remove endpoint InitLogging (#6182)
Browse files Browse the repository at this point in the history
  • Loading branch information
qfrank authored Dec 10, 2024
1 parent 4ccb08f commit e6c2f89
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 78 deletions.
47 changes: 0 additions & 47 deletions mobile/init_logging_test.go

This file was deleted.

31 changes: 0 additions & 31 deletions mobile/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -2218,37 +2218,6 @@ func deserializeAndCompressKey(DesktopKey string) string {
return CompressPublicKey(sanitisedKey)
}

type InitLoggingRequest struct {
logutils.LogSettings
LogRequestGo bool `json:"LogRequestGo"`
LogRequestFile string `json:"LogRequestFile"`
}

// InitLogging The InitLogging function should be called when the application starts.
// This ensures that we can capture logs before the user login. Subsequent calls will update the logger settings.
// Before this, we can only capture logs after user login since we will only configure the logging after the login process.
// Deprecated: Use InitializeApplication instead
func InitLogging(logSettingsJSON string) string {
var logSettings InitLoggingRequest
var err error
if err = json.Unmarshal([]byte(logSettingsJSON), &logSettings); err != nil {
return makeJSONResponse(err)
}

if err = logutils.OverrideRootLoggerWithConfig(logSettings.LogSettings); err == nil {
logutils.ZapLogger().Info("logging initialised", zap.String("logSettings", logSettingsJSON))
}

if logSettings.LogRequestGo {
err = requestlog.ConfigureAndEnableRequestLogging(logSettings.LogRequestFile)
if err != nil {
return makeJSONResponse(err)
}
}

return makeJSONResponse(err)
}

func GetRandomMnemonic() string {
mnemonic, err := account.GetRandomMnemonic()
if err != nil {
Expand Down

0 comments on commit e6c2f89

Please sign in to comment.