logger.Fatal("Ping period value must be less than pong wait value",zap.Int("socket.ping_period_ms",mainConfig.GetSocket().PingPeriodMs),zap.Int("socket.pong_wait_ms",mainConfig.GetSocket().PongWaitMs))
logger.Fatal("Ping period value must be less than pong wait value",zap.Int("socket.ping_period_ms",config.GetSocket().PingPeriodMs),zap.Int("socket.pong_wait_ms",config.GetSocket().PongWaitMs))
}
ifmainConfig.GetRuntime().MinCount<0{
logger.Fatal("Minimum runtime instance count must be >= 0",zap.Int("runtime.min_count",mainConfig.GetRuntime().MinCount))
ifconfig.GetRuntime().MinCount<0{
logger.Fatal("Minimum runtime instance count must be >= 0",zap.Int("runtime.min_count",config.GetRuntime().MinCount))
}
ifmainConfig.GetRuntime().MaxCount<1{
logger.Fatal("Maximum runtime instance count must be >= 1",zap.Int("runtime.max_count",mainConfig.GetRuntime().MaxCount))
ifconfig.GetRuntime().MaxCount<1{
logger.Fatal("Maximum runtime instance count must be >= 1",zap.Int("runtime.max_count",config.GetRuntime().MaxCount))
logger.Fatal("Minimum runtime instance count must be less than or equal to maximum runtime instance count",zap.Int("runtime.min_count",mainConfig.GetRuntime().MinCount),zap.Int("runtime.max_count",mainConfig.GetRuntime().MaxCount))
logger.Fatal("Minimum runtime instance count must be less than or equal to maximum runtime instance count",zap.Int("runtime.min_count",config.GetRuntime().MinCount),zap.Int("runtime.max_count",config.GetRuntime().MaxCount))
}
ifmainConfig.GetRuntime().CallStackSize<1{
logger.Fatal("Runtime instance call stack size must be >= 1",zap.Int("runtime.call_stack_size",mainConfig.GetRuntime().CallStackSize))
ifconfig.GetRuntime().CallStackSize<1{
logger.Fatal("Runtime instance call stack size must be >= 1",zap.Int("runtime.call_stack_size",config.GetRuntime().CallStackSize))
}
ifmainConfig.GetRuntime().RegistrySize<128{
logger.Fatal("Runtime instance registry size must be >= 128",zap.Int("runtime.registry_size",mainConfig.GetRuntime().RegistrySize))
ifconfig.GetRuntime().RegistrySize<128{
logger.Fatal("Runtime instance registry size must be >= 128",zap.Int("runtime.registry_size",config.GetRuntime().RegistrySize))
}
ifmainConfig.GetMatch().InputQueueSize<1{
logger.Fatal("Match input queue size must be >= 1",zap.Int("match.input_queue_size",mainConfig.GetMatch().InputQueueSize))
ifconfig.GetMatch().InputQueueSize<1{
logger.Fatal("Match input queue size must be >= 1",zap.Int("match.input_queue_size",config.GetMatch().InputQueueSize))
}
ifmainConfig.GetMatch().CallQueueSize<1{
logger.Fatal("Match call queue size must be >= 1",zap.Int("match.call_queue_size",mainConfig.GetMatch().CallQueueSize))
ifconfig.GetMatch().CallQueueSize<1{
logger.Fatal("Match call queue size must be >= 1",zap.Int("match.call_queue_size",config.GetMatch().CallQueueSize))
}
ifmainConfig.GetMatch().JoinAttemptQueueSize<1{
logger.Fatal("Match join attempt queue size must be >= 1",zap.Int("match.join_attempt_queue_size",mainConfig.GetMatch().JoinAttemptQueueSize))
ifconfig.GetMatch().JoinAttemptQueueSize<1{
logger.Fatal("Match join attempt queue size must be >= 1",zap.Int("match.join_attempt_queue_size",config.GetMatch().JoinAttemptQueueSize))
}
ifmainConfig.GetMatch().DeferredQueueSize<1{
logger.Fatal("Match deferred queue size must be >= 1",zap.Int("match.deferred_queue_size",mainConfig.GetMatch().DeferredQueueSize))
ifconfig.GetMatch().DeferredQueueSize<1{
logger.Fatal("Match deferred queue size must be >= 1",zap.Int("match.deferred_queue_size",config.GetMatch().DeferredQueueSize))
}
ifmainConfig.GetMatch().JoinMarkerDeadlineMs<1{
logger.Fatal("Match join marker deadline must be >= 1",zap.Int("match.join_marker_deadline_ms",mainConfig.GetMatch().JoinMarkerDeadlineMs))
ifconfig.GetMatch().JoinMarkerDeadlineMs<1{
logger.Fatal("Match join marker deadline must be >= 1",zap.Int("match.join_marker_deadline_ms",config.GetMatch().JoinMarkerDeadlineMs))
}
ifmainConfig.GetTracker().EventQueueSize<1{
logger.Fatal("Tracker presence event queue size must be >= 1",zap.Int("tracker.event_queue_size",mainConfig.GetTracker().EventQueueSize))
ifconfig.GetTracker().EventQueueSize<1{
logger.Fatal("Tracker presence event queue size must be >= 1",zap.Int("tracker.event_queue_size",config.GetTracker().EventQueueSize))
}
// If the runtime path is not overridden, set it to `datadir/modules`.
MaxBackupsint`yaml:"max_backups" json:"max_backups" usage:"The maximum number of old log files to retain. The default is to retain all old log files (though MaxAge may still cause them to get deleted.)"`
LocalTimebool`yaml:"local_time" json:"local_time" usage:"This determines if the time used for formatting the timestamps in backup files is the computer's local time. The default is to use UTC time."`
Compressbool`yaml:"compress" json:"compress" usage:"This determines if the rotated log files should be compressed using gzip."`
Formatstring`yaml:"format" json:"format" usage:"Set logging output format. Can either be 'JSON' or 'Stackdriver'. Default is 'JSON'."`
}
// NewLoggerConfig creates a new LoggerConfig struct.