Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • MKCLOS/coredevelopmentplatform/corepkgv2
Show changes
Commits on Source (11)
Showing with 39 additions and 40 deletions
......@@ -54,7 +54,7 @@ func LogError(args ...interface{}) {
// LogPanic logs a message at level Panic on the standard logger.
func LogPanic(args ...interface{}) {
log.Panic(args)
log.Panic(args...)
}
// // LogJSONObject Format string
......
......@@ -4,7 +4,6 @@
package loggermdl
import (
"encoding/json"
"fmt"
"testing"
......@@ -46,56 +45,56 @@ func ExampleLogDebug() {
//Output:
//
}
func TestLogJSONString(t *testing.T) {
a := `{"Age": 1,"Name": "sometext"}`
// func TestLogJSONString(t *testing.T) {
// a := `{"Age": 1,"Name": "sometext"}`
assert.NotPanics(t, func() { LogJSONString(a) }, "The code did panic")
// assert.NotPanics(t, func() { LogJSONString(a) }, "The code did panic")
//Output2:
// {
// "Age": 1,
// "Name": "sometext"
// }
}
// //Output2:
// // {
// // "Age": 1,
// // "Name": "sometext"
// // }
// }
func ExampleLogHREnd() {
LogHREnd()
//Output:
//<<<<<<<<<<<<<<<<<<<<<<<
}
func TestLogJSONObject(t *testing.T) {
type MySt struct {
Name string
Age int
}
m := MySt{"sometext", 1}
// jsonUnmarshal(json.Marshal(m), &m)
assert.NotPanics(t, func() { LogJSONObject(m) }, "The code did panic")
//Output1:
//{
// "Age": 1,
// "Name": "sometext"
//}
}
// func TestLogJSONObject(t *testing.T) {
// type MySt struct {
// Name string
// Age int
// }
// m := MySt{"sometext", 1}
// // jsonUnmarshal(json.Marshal(m), &m)
// assert.NotPanics(t, func() { LogJSONObject(m) }, "The code did panic")
// //Output1:
// //{
// // "Age": 1,
// // "Name": "sometext"
// //}
// }
func TestLogJSONByte(t *testing.T) { // func ExampleLogJSONByte() {
// func TestLogJSONByte(t *testing.T) { // func ExampleLogJSONByte() {
type MySt struct {
Name string
Age int
}
m := MySt{"sometext", 1}
a, _ := json.Marshal(m)
// type MySt struct {
// Name string
// Age int
// }
// m := MySt{"sometext", 1}
// a, _ := json.Marshal(m)
assert.NotPanics(t, func() { LogJSONByte(a) }, "The code did panic")
//Output1:
// {
// "Age": 1,
// "Name": "sometext"
// }
// assert.NotPanics(t, func() { LogJSONByte(a) }, "The code did panic")
// //Output1:
// // {
// // "Age": 1,
// // "Name": "sometext"
// // }
}
// }
func ExampleLogHRStart() {
LogHRStart()
//Output:
......