Commit cb33662b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent cb86b9da
// Copyright (C) 2017 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Copyright (C) 2017-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
......@@ -19,8 +19,7 @@
// Package log provides logging with severity levels and tasks integration.
//
// XXX inspired by cockroach
// XXX just use cockroach/util/log directly?
// It is inspired by cockroach/util/log package.
package log
import (
......@@ -59,12 +58,12 @@ func withTask(ctx context.Context, argv ...interface{}) []interface{} {
type Depth int
func (d Depth) Info(ctx context.Context, argv ...interface{}) {
// XXX avoid task formatting if logging severity disabled
// TODO avoid task formatting if logging severity disabled
glog.InfoDepth(int(d+1), withTask(ctx, argv...)...)
}
func (d Depth) Infof(ctx context.Context, format string, argv ...interface{}) {
// XXX avoid formatting if logging severity disabled
// TODO avoid formatting if logging severity disabled
glog.InfoDepth(int(d+1), withTask(ctx, fmt.Sprintf(format, argv...))...)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment