Skip to content

Commit

Permalink
Log prospector configured paths at INFO level (elastic#6030)
Browse files Browse the repository at this point in the history
* Log prospector configured paths at INFO level

I found myself enabling `-d "prospector"` quite often to
check the configured paths, so I thought upgrading it to INFO level is
going to be beneficial for users.

As I didn't want to increase verbosity, I looked for other Info messages that
could be Debug messages, and demoded a couple that where redundant (same information
printed in another Info message) or a little to obscure to print all the time (the ID
of the prospector).

* remove trailing space
  • Loading branch information
tsg authored and kvch committed Jan 11, 2018
1 parent ccf281a commit 0b9e383
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion filebeat/prospector/log/prospector.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func NewProspector(
return nil, err
}

logp.Debug("prospector", "File Configs: %v", p.config.Paths)
logp.Info("Configured paths: %v", p.config.Paths)

return p, nil
}
Expand Down
2 changes: 1 addition & 1 deletion filebeat/prospector/prospector.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func New(
// Start starts the prospector
func (p *Prospector) Start() {
p.wg.Add(1)
logp.Info("Starting prospector of type: %v; ID: %d ", p.config.Type, p.ID)
logp.Debug("prospector", "Starting prospector of type: %v; ID: %d", p.config.Type, p.ID)

onceWg := sync.WaitGroup{}
if p.Once {
Expand Down
4 changes: 2 additions & 2 deletions filebeat/registrar/registrar.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (r *Registrar) Init() error {
return fmt.Errorf("Registry file path is not a regular file: %s", r.registryFile)
}

logp.Info("Registry file set to: %s", r.registryFile)
logp.Debug("registrar", "Registry file set to: %s", r.registryFile)

return nil
}
Expand Down Expand Up @@ -147,7 +147,7 @@ func (r *Registrar) Start() error {
}

func (r *Registrar) Run() {
logp.Info("Starting Registrar")
logp.Debug("registrar", "Starting Registrar")
// Writes registry on shutdown
defer func() {
r.writeRegistry()
Expand Down

0 comments on commit 0b9e383

Please sign in to comment.