github.com/RajatVaryani/mattermost-server@v5.11.1+incompatible/mlog/human/simple_writer.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package human 5 6 import ( 7 "fmt" 8 "io" 9 ) 10 11 type SimpleWriter struct { 12 out io.Writer 13 } 14 15 func (w *SimpleWriter) Write(e LogEntry) { 16 fmt.Fprintln(w.out, e) 17 } 18 19 func NewSimpleWriter(out io.Writer) *SimpleWriter { 20 w := new(SimpleWriter) 21 w.out = out 22 return w 23 }