status-go/protocol/requests/initialize_application.go
Igor Sirotin e477269983
feat_: init logs in InitializeApplication (#6117)
* feat_: functional tests for logs

* feat_: init logs in `InitializeApplication`

* chore_: completely remove `MobileSystem` log setting

migrate

* chore_: condition for call startTime

* fix_: rebase issues, linter

* fix_: sql query

* test_: mark rpc TestInitializeLogging

* test_: skip TestInitializeLogging
2024-11-29 11:43:07 +00:00

34 lines
938 B
Go

package requests
import (
"errors"
)
var (
ErrInitializeApplicationInvalidDataDir = errors.New("initialize-centralized-metric: no dataDir")
)
type InitializeApplication struct {
DataDir string `json:"dataDir"`
MixpanelAppID string `json:"mixpanelAppId"`
MixpanelToken string `json:"mixpanelToken"`
// MediaServerEnableTLS is optional, if not provided, media server will use TLS by default
MediaServerEnableTLS *bool `json:"mediaServerEnableTLS"`
SentryDSN string `json:"sentryDSN"`
// LogDir specifies the directory where logs are stored.
// If empty, logs are stored in the `DataDir`.
LogDir string `json:"logDir"`
LogEnabled bool `json:"logEnabled"`
LogLevel string `json:"logLevel"`
APILoggingEnabled bool `json:"apiLoggingEnabled"`
}
func (i *InitializeApplication) Validate() error {
if len(i.DataDir) == 0 {
return ErrInitializeApplicationInvalidDataDir
}
return nil
}