github.com/alejandroEsc/spdy@v0.0.0-20200317064415-01a02f0eb389/log.go (about) 1 // Copyright 2014 Jamie Hall. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package spdy 6 7 import ( 8 "io" 9 logging "log" 10 11 "github.com/SlyMarbo/spdy/common" 12 ) 13 14 var log = common.GetLogger() 15 var debug = common.GetDebugLogger() 16 17 // SetLogger sets the package's error logger. 18 func SetLogger(l *logging.Logger) { 19 common.SetLogger(l) 20 } 21 22 // SetLogOutput sets the output for the package's error logger. 23 func SetLogOutput(w io.Writer) { 24 common.SetLogOutput(w) 25 } 26 27 // SetDebugLogger sets the package's debug info logger. 28 func SetDebugLogger(l *logging.Logger) { 29 common.SetDebugLogger(l) 30 } 31 32 // SetDebugOutput sets the output for the package's debug info logger. 33 func SetDebugOutput(w io.Writer) { 34 common.SetDebugOutput(w) 35 } 36 37 // EnableDebugOutput sets the output for the package's debug info logger to os.Stdout. 38 func EnableDebugOutput() { 39 common.EnableDebugOutput() 40 }