We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8d19eae + 0f2ae4a commit ea7da97Copy full SHA for ea7da97
main.go
@@ -32,11 +32,21 @@ func (l Log) String() string {
32
}
33
34
func (c *Context) Log(message interface{}) {
35
- c.Logger.Write(message, LOGGER_TYPE_LOG, false)
+ switch v := message.(type) {
36
+ default:
37
+ c.Logger.Write(fmt.Sprintf("%#v", v)+"\n", LOGGER_TYPE_LOG, false)
38
+ case string:
39
+ c.Logger.Write(v+"\n", LOGGER_TYPE_LOG, false)
40
+ }
41
42
43
func (c *Context) Error(message interface{}) {
- c.Logger.Write(message, LOGGER_TYPE_ERROR, false)
44
45
46
+ c.Logger.Write(fmt.Sprintf("%#v", v)+"\n", LOGGER_TYPE_ERROR, false)
47
48
+ c.Logger.Write(v+"\n", LOGGER_TYPE_ERROR, false)
49
50
51
52
type Request struct {
0 commit comments