fix logging

This commit is contained in:
Egor Kovetskiy 2019-08-20 19:05:37 +03:00
parent ecee64f778
commit 3cd9504a04
3 changed files with 9 additions and 6 deletions

View File

@ -3,6 +3,7 @@ package log
import ( import (
"github.com/kovetskiy/lorg" "github.com/kovetskiy/lorg"
"github.com/reconquest/cog" "github.com/reconquest/cog"
"github.com/reconquest/karma-go"
) )
var ( var (
@ -28,7 +29,7 @@ func Init(debug, trace bool) {
} }
func Fatalf( func Fatalf(
reason interface{}, reason error,
message string, message string,
args ...interface{}, args ...interface{},
) { ) {
@ -36,7 +37,7 @@ func Fatalf(
} }
func Errorf( func Errorf(
reason interface{}, reason error,
message string, message string,
args ...interface{}, args ...interface{},
) { ) {
@ -44,7 +45,7 @@ func Errorf(
} }
func Warningf( func Warningf(
reason interface{}, reason error,
message string, message string,
args ...interface{}, args ...interface{},
) { ) {
@ -52,7 +53,7 @@ func Warningf(
} }
func Infof( func Infof(
context interface{}, context *karma.Context,
message string, message string,
args ...interface{}, args ...interface{},
) { ) {
@ -60,7 +61,7 @@ func Infof(
} }
func Debugf( func Debugf(
context interface{}, context *karma.Context,
message string, message string,
args ...interface{}, args ...interface{},
) { ) {
@ -68,7 +69,7 @@ func Debugf(
} }
func Tracef( func Tracef(
context interface{}, context *karma.Context,
message string, message string,
args ...interface{}, args ...interface{},
) { ) {

View File

@ -57,6 +57,7 @@ func EnsureAncestry(
} }
log.Debugf( log.Debugf(
nil,
"empty pages under %q to be created: %s", "empty pages under %q to be created: %s",
parent.Title, parent.Title,
strings.Join(rest, ` > `), strings.Join(rest, ` > `),

View File

@ -48,6 +48,7 @@ func ResolvePage(
path = append(path, meta.Title) path = append(path, meta.Title)
log.Debugf( log.Debugf(
nil,
"resolving page path: ??? > %s", "resolving page path: ??? > %s",
strings.Join(path, ` > `), strings.Join(path, ` > `),
) )