mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Provide nomad.Config with a default LogOutput of os.StdErr
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
@@ -61,11 +60,6 @@ type Agent struct {
|
||||
|
||||
// NewAgent is used to create a new agent with the given configuration
|
||||
func NewAgent(config *Config, logOutput io.Writer) (*Agent, error) {
|
||||
// Ensure we have a log sink
|
||||
if logOutput == nil {
|
||||
logOutput = os.Stderr
|
||||
}
|
||||
|
||||
a := &Agent{
|
||||
config: config,
|
||||
logger: log.New(logOutput, "", log.LstdFlags),
|
||||
|
||||
Reference in New Issue
Block a user