Documentation ¶
Index ¶
- Constants
- func CalculateLogVolumeSizeLimit(maxLogFilesSize []resource.Quantity) resource.Quantity
- func JavaLogTemplateValue(loggingConfig LoggingConfig, productLogging *ProductLogging) map[string]interface{}
- func MakeVectorYaml(ctx context.Context, client ctrlclient.Client, namespace string, ...) (string, error)
- type ConfigGenerator
- type ConfigGeneratorOption
- type ConfigGeneratorOptionFunc
- type Log4j2Config
- type Log4jConfig
- type LogType
- type LogbackConfig
- type LoggingConfig
- type ProductLogging
Constants ¶
const ( DefaultLoggerLevel = "INFO" RootLoggerName = "ROOT" DefaultLog4jConversionPattern = "[%d] %p %m (%c)%n" DefaultLog4j2ConversionPattern = "%d{ISO8601} %-5p %m%n" DefaultLogbackConversionPattern = "%d{ISO8601} %-5p [%t:%C{1}@%L] - %m%n" DefaultRotatingFileHandlerMaxBytes float64 = 10.0 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func CalculateLogVolumeSizeLimit ¶
calculate_log_volume_size_limit calculates the log volume size limit based on the given max log file sizes. The limit is calculated by summing up all the given sizes, scaling the result to MEBI and multiplying it by 3.0. The result is then ceiled to avoid bulky numbers due to floating-point arithmetic.
func JavaLogTemplateValue ¶ added in v0.11.0
func JavaLogTemplateValue(loggingConfig LoggingConfig, productLogging *ProductLogging) map[string]interface{}
Types ¶
type ConfigGenerator ¶ added in v0.11.0
type ConfigGenerator struct {
// contains filtered or unexported fields
}
func NewConfigGenerator ¶ added in v0.11.0
func NewConfigGenerator( loggingConfigSpec *loggingv1alpha1.LoggingConfigSpec, containerName string, logFileName string, logType LogType, opts ...ConfigGeneratorOptionFunc, ) (*ConfigGenerator, error)
func (*ConfigGenerator) Content ¶ added in v0.11.0
func (l *ConfigGenerator) Content() (string, error)
type ConfigGeneratorOption ¶ added in v0.11.2
type ConfigGeneratorOptionFunc ¶ added in v0.11.2
type ConfigGeneratorOptionFunc func(*ConfigGeneratorOption)
type Log4j2Config ¶ added in v0.11.0
type Log4j2Config struct {
// contains filtered or unexported fields
}
Log4j2Config is a struct that contains log4j2 logging configuration
func (*Log4j2Config) Content ¶ added in v0.11.0
func (l *Log4j2Config) Content() (string, error)
Content implements the LoggingConfig interface
func (*Log4j2Config) LoggerFormatter ¶ added in v0.11.0
func (l *Log4j2Config) LoggerFormatter(name string, level string) string
LoggerFormatter implements the LoggingConfig interface
func (*Log4j2Config) String ¶ added in v0.11.0
func (l *Log4j2Config) String() string
String implements the LoggingConfig interface
func (*Log4j2Config) Template ¶ added in v0.11.0
func (l *Log4j2Config) Template() string
Template implements the LoggingConfig interface
type Log4jConfig ¶ added in v0.11.0
type Log4jConfig struct {
// contains filtered or unexported fields
}
Log4jConfig is a struct that holds the configuration for log4j logging
func (*Log4jConfig) Content ¶ added in v0.11.0
func (l *Log4jConfig) Content() (string, error)
Content implements LoggingConfig.
func (*Log4jConfig) LoggerFormatter ¶ added in v0.11.0
func (l *Log4jConfig) LoggerFormatter(name string, level string) string
LoggerFormatter implements LoggingConfig.
func (*Log4jConfig) String ¶ added in v0.11.0
func (l *Log4jConfig) String() string
String implements LoggingConfig.
func (*Log4jConfig) Template ¶ added in v0.11.0
func (l *Log4jConfig) Template() string
Template implements LoggingConfig.
type LogbackConfig ¶ added in v0.11.0
type LogbackConfig struct {
// contains filtered or unexported fields
}
LogbackConfig is a struct that contains logback logging configuration
func (*LogbackConfig) Content ¶ added in v0.11.0
func (l *LogbackConfig) Content() (string, error)
Content implements the LoggingConfig interface
func (*LogbackConfig) LoggerFormatter ¶ added in v0.11.0
func (l *LogbackConfig) LoggerFormatter(name string, level string) string
LoggerFormatter implements the LoggingConfig interface
func (*LogbackConfig) String ¶ added in v0.11.0
func (l *LogbackConfig) String() string
String implements the LoggingConfig interface
func (*LogbackConfig) Template ¶ added in v0.11.0
func (l *LogbackConfig) Template() string
Template implements the LoggingConfig interface
type LoggingConfig ¶ added in v0.11.0
type ProductLogging ¶ added in v0.11.0
type ProductLogging struct { RootLogLevel string // log msg format ConsoleHandlerFormatter string ConsoleHandlerLevel string RotatingFileHandlerLevel string RotatingFileHandlerFile string RotatingFileHandlerMaxBytes float64 RotatingFileHandlerBackupCount int Loggers map[string]loggingv1alpha1.LogLevelSpec }