Exemplo n.º 1
0
import (
	"encoding/json"
	"fmt"
	"runtime"
	"strings"
	"sync"
	"time"

	"sirendaou.com/duserver/common/redis"
	"sirendaou.com/duserver/common/safemap"
	"sirendaou.com/duserver/common/uuid"
)

var (
	g_traceMgr = safemap.New()
)

type TraceT struct {
	ID     string
	Caller []string
	Info   []string
	Mutex  *sync.Mutex
}

func caller(dept int) string {
	_, file, line, ok := runtime.Caller(dept)
	if !ok {
		return "Unknown"
	}
Exemplo n.º 2
0
func init() {
	g_userMsgMgr = &UserMsgMgr{
		msgMap: safemap.New(),
	}
}