Add logging control

This commit is contained in:
Julien Riou 2018-06-24 17:49:48 +02:00
commit f0d3cd5bdf
No known key found for this signature in database
GPG key ID: BA3E15176E45E85D
9 changed files with 164 additions and 24 deletions

View file

@ -2,9 +2,9 @@ package base
import (
"fmt"
"github.com/jouir/pgterminate/log"
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"path/filepath"
"strings"
"sync"
@ -64,7 +64,7 @@ func (c *Config) Read(file string) error {
// Reload reads from file and update configuration
func (c *Config) Reload() {
log.Println("Reloading configuration")
log.Debug("Reloading configuration")
c.mutex.Lock()
defer c.mutex.Unlock()
if c.File != "" {