高热共公日志库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
393 B

  1. package grlogs
  2. import (
  3. _ "golib.gaore.com/GaoreGo/grlogs/logs/es"
  4. "testing"
  5. "time"
  6. )
  7. func TestGetLogger(t *testing.T) {
  8. l := Get("nds", 128).SetAdapter(LevelAll, AdapterElasticSearch)
  9. l.Debug("我正在调试")
  10. l.Critical("出错了")
  11. Get("nds").Warning("hadoee %s", time.Now().Format(time.RFC1123))
  12. GetEs("wifi")
  13. for i := 0; i < 10; i++ {
  14. Get("wifi").Error("neoweiwoewe")
  15. }
  16. }