From df4265707999b08d220374c08e82711f264247bf Mon Sep 17 00:00:00 2001 From: Yawning Angel Date: Fri, 3 Apr 2015 14:21:31 +0000 Subject: Move logging wrappers into common/log, and add a DEBUG log level. Implements feature #15576. --- obfs4proxy/termmon.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'obfs4proxy/termmon.go') diff --git a/obfs4proxy/termmon.go b/obfs4proxy/termmon.go index 186293c..86db190 100644 --- a/obfs4proxy/termmon.go +++ b/obfs4proxy/termmon.go @@ -35,6 +35,8 @@ import ( "runtime" "syscall" "time" + + "git.torproject.org/pluggable-transports/obfs4.git/common/log" ) var termMonitorOSInit func(*termMonitor) error @@ -77,7 +79,7 @@ func (m *termMonitor) termOnStdinClose() { // expected behavior. No matter what, if this unblocks, assume // that stdin is closed, and treat that as having received a // SIGTERM. - noticef("Stdin is closed or unreadable: %v", err) + log.Noticef("Stdin is closed or unreadable: %v", err) m.sigChan <- syscall.SIGTERM } @@ -97,7 +99,7 @@ func (m *termMonitor) termOnPPIDChange(ppid int) { // Treat the parent PID changing as the same as having received // a SIGTERM. - noticef("Parent pid changed: %d (was %d)", os.Getppid(), ppid) + log.Noticef("Parent pid changed: %d (was %d)", os.Getppid(), ppid) m.sigChan <- syscall.SIGTERM } -- cgit v1.2.3