chg: [filerwatcher] less verbose output

master
Jean-Louis Huynen 2021-02-18 15:11:51 +01:00
parent c598be5e25
commit 7c929bd599
No known key found for this signature in database
GPG Key ID: 64799157F4BD6B93
1 changed files with 0 additions and 4 deletions

View File

@ -83,7 +83,6 @@ func (fw *FileWatcherReader) Read(p []byte) (n int, err error) {
n, err = rreader.Read(p) n, err = rreader.Read(p)
fw.watching = true fw.watching = true
fw.insertsep = false fw.insertsep = false
log.Println("Inserting file seperator ")
fw.curfile.Close() fw.curfile.Close()
return n, err return n, err
} }
@ -101,20 +100,17 @@ func (fw *FileWatcherReader) Read(p []byte) (n int, err error) {
b64encoder.Write(buf[:bytesread]) b64encoder.Write(buf[:bytesread])
// Close the encoder to flush partially written blocks // Close the encoder to flush partially written blocks
b64encoder.Close() b64encoder.Close()
log.Println(b64buffer)
if err == io.EOF { if err == io.EOF {
fw.insertsep = true fw.insertsep = true
} }
// Copy from b64buffer to p // Copy from b64buffer to p
n, err = b64buffer.Read(p[:len(b64buffer.Bytes())]) n, err = b64buffer.Read(p[:len(b64buffer.Bytes())])
log.Println("len b64 buffer: ", len(b64buffer.Bytes()))
} else { } else {
n, err = fw.curfile.Read(p) n, err = fw.curfile.Read(p)
if err == io.EOF { if err == io.EOF {
fw.insertsep = true fw.insertsep = true
} }
} }
log.Println("nread: ", n)
return n, err return n, err
} }