Skip to content

Commit 43e2c37

Browse files
committed
Avoid printing out debug logs when SSHWIFTY_DEBUG is not enabled
1 parent e54cdcb commit 43e2c37

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

application/log/writer_nodebug.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,14 @@ func NewDebugOrNonDebugWriter(
4141
if useDebug {
4242
return NewWriter(context, w)
4343
}
44-
4544
return NewNonDebugWriter(context, w)
4645
}
4746

47+
// Context build a new Sub context
48+
func (w NonDebugWriter) Context(name string) Logger {
49+
return NewNonDebugWriter(w.c+" > "+name, w.w)
50+
}
51+
4852
// TitledContext build a new Sub context with specified formatted title
4953
func (w NonDebugWriter) TitledContext(
5054
name string,

0 commit comments

Comments
 (0)