github.com/MetalBlockchain/metalgo@v1.11.9/utils/logging/config.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package logging
     5  
     6  type RotatingWriterConfig struct {
     7  	MaxSize   int    `json:"maxSize"` // in megabytes
     8  	MaxFiles  int    `json:"maxFiles"`
     9  	MaxAge    int    `json:"maxAge"` // in days
    10  	Directory string `json:"directory"`
    11  	Compress  bool   `json:"compress"`
    12  }
    13  
    14  // Config defines the configuration of a logger
    15  type Config struct {
    16  	RotatingWriterConfig
    17  	DisableWriterDisplaying bool   `json:"disableWriterDisplaying"`
    18  	LogLevel                Level  `json:"logLevel"`
    19  	DisplayLevel            Level  `json:"displayLevel"`
    20  	LogFormat               Format `json:"logFormat"`
    21  	MsgPrefix               string `json:"-"`
    22  	LoggerName              string `json:"-"`
    23  }