summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git/hackers_watch.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-09-05 00:34:21 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-09-05 00:34:21 -0600
commit6b94a9b6588112328fa2738b1c149b48908f5029 (patch)
tree4e7e11ad85997855af38b219a1b8193e1e4dab88 /src/nshd/hackers_git/hackers_watch.go
parent066fe52728294bf764ccb89750eecae634a4c1a6 (diff)
clean up logging
Diffstat (limited to 'src/nshd/hackers_git/hackers_watch.go')
-rw-r--r--src/nshd/hackers_git/hackers_watch.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nshd/hackers_git/hackers_watch.go b/src/nshd/hackers_git/hackers_watch.go
index f1c4018..da008f8 100644
--- a/src/nshd/hackers_git/hackers_watch.go
+++ b/src/nshd/hackers_git/hackers_watch.go
@@ -29,7 +29,7 @@ func (o *Hackers) watchHomedir(uid int32) {
o.in_wd2uid[wd] = uid
} else {
delete(o.in_uid2wd, uid)
- logger.Info("could not watch: %s", o.users[uid].passwd.HomeDir)
+ logger.Debug("hackers.git: %v", err)
}
user := o.users[uid]
user.passwd.PwHash = load_user_password(user.passwd.HomeDir + "/.password")
@@ -39,7 +39,7 @@ func (o *Hackers) watchHomedir(uid int32) {
func (o *Hackers) unwatchHomedir(wd inotify.Cint) {
err := o.in_fd.RmWatch(wd)
if err != nil {
- logger.Warning("could not remove watch: %v", wd)
+ logger.Warning("hackers.git: %v", err)
return
}
uid := o.in_wd2uid[wd]
@@ -72,14 +72,14 @@ func (o *Hackers) reload() (err error) {
o.in_uid2wd = make(map[int32]inotify.Cint, len(filenames))
o.in_wd2uid = make(map[inotify.Cint]int32, len(filenames))
for _, filename := range filenames {
- logger.Info("Loading yaml file: %s", filename)
+ logger.Debug("hackers.git: Loading yaml file: %s", filename)
user, err := load_user_yaml(filename)
if err == nil {
o.users[user.passwd.UID] = user
- logger.Info("... success")
+ logger.Debug("hackers.git: ... success")
o.watchHomedir(user.passwd.UID)
} else {
- logger.Info("... error: %v", err)
+ logger.Debug("hackers.git: ... error: %v", err)
}
}
@@ -122,7 +122,7 @@ func (o *Hackers) worker_handle_passwd(uid int32) {
}
func worker_error(format string, a ...interface{}) {
- logger.Err(format, a)
+ logger.Err("hackers.git: "+ format, a)
os.Exit(int(lsb.EXIT_FAILURE))
}
@@ -150,15 +150,15 @@ func (o *Hackers) worker() {
panic("recieved child event from inotify, but no child name")
}
filename := o.cfg.Yamldir + "/" + *event.Name
- logger.Info("Loading yaml file: %s", filename)
+ logger.Debug("hackers.git: Loading yaml file: %s", filename)
user, err := load_user_yaml(filename)
if err == nil {
// User added/updated
- logger.Info("... success")
+ logger.Debug("hackers.git: ... success")
o.worker_handle_user_add(user)
} else if user.passwd.UID >= 0 {
// User became invalid
- logger.Info("... error: %v", err)
+ logger.Debug("hackers.git: ... error: %v", err)
o.worker_handle_user_del(user.passwd.UID)
}
} else {
@@ -184,7 +184,7 @@ func (o *Hackers) worker() {
o.worker_handle_passwd(o.in_wd2uid[event.Wd])
}
} else {
- logger.Debug("event didn't match: %#v", event)
+ logger.Debug("hackers.git: event didn't match: %#v", event)
}
}
}