summaryrefslogtreecommitdiff
path: root/obfs4proxy/termmon.go
diff options
context:
space:
mode:
authorYawning Angel <yawning@torproject.org>2015-04-03 14:21:31 +0000
committerYawning Angel <yawning@torproject.org>2015-04-03 14:21:31 +0000
commitdf4265707999b08d220374c08e82711f264247bf (patch)
treed2ded324520a56c42dcd758c33ff6f6a4ba23cd3 /obfs4proxy/termmon.go
parent402fe97d8547d216746d2237010f32b691cb71e1 (diff)
Move logging wrappers into common/log, and add a DEBUG log level.
Implements feature #15576.
Diffstat (limited to 'obfs4proxy/termmon.go')
-rw-r--r--obfs4proxy/termmon.go6
1 files changed, 4 insertions, 2 deletions
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
}