-
Notifications
You must be signed in to change notification settings - Fork 90
/
logger.go
28 lines (23 loc) · 1.22 KB
/
logger.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package constants
import "time"
const (
// Log keys are used to provide a consistent key-value interface for logging across the daemon.
SubmoduleLogKey = "submodule"
ErrorLogKey = "error"
ExchangeIdLogKey = "exchangeId"
MarketIdLogKey = "marketId"
PriceLogKey = "Price"
ReasonLogKey = "reason"
// Module and Submodule names are used to provide consistent key-value pairs for logging across the daemon.
PricefeedDaemonModuleName = "pricefeed-daemon"
PriceFetcherSubmoduleName = "price-fetcher"
PriceEncoderSubmoduleName = "price-encoder"
PriceUpdaterSubmoduleName = "price-updater"
MarketParamUpdaterSubmoduleName = "market-param-updater"
// PriceDaemonStartupErrorGracePeriod defines the amount of time the daemon waits before logging issues that are
// intermittent on daemon startup as true errors. Examples of this includes price conversion failures due to
// an uninitialized prices cache, and failures to fetch market param updates due to a delay on the protocol side
// in starting the prices query service.
// If the protocol is not started within this grace period, the daemon will report these errors as true errors.
PriceDaemonStartupErrorGracePeriod = 120 * time.Second
)