Skip to content

Commit

Permalink
Fix linter in carbon package
Browse files Browse the repository at this point in the history
  • Loading branch information
Felixoid committed Sep 30, 2021
1 parent d0b41be commit 9e2efd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions carbon/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/lomik/zapwriter"
)

// App is an application object used in main
type App struct {
sync.RWMutex
Config *Config
Expand Down
4 changes: 3 additions & 1 deletion carbon/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
)

const (
// MetricEndpointLocal used to send metrics in the carbon-clickhouse itself
MetricEndpointLocal = "local"
)

Expand Down Expand Up @@ -192,13 +193,14 @@ func NewConfig() *Config {
return cfg
}

// NewLoggingConfig returns the zapwriter.Config with logging into "/var/log/carbon-clickhouse/carbon-clickhouse.log"
func NewLoggingConfig() zapwriter.Config {
cfg := zapwriter.NewConfig()
cfg.File = "/var/log/carbon-clickhouse/carbon-clickhouse.log"
return cfg
}

// PrintConfig ...
// PrintDefaultConfig ...
func PrintDefaultConfig() error {
cfg := NewConfig()
buf := new(bytes.Buffer)
Expand Down

0 comments on commit 9e2efd0

Please sign in to comment.