コード例 #1
0
ファイル: trace.go プロジェクト: sunyuantao/windows
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"
	}
コード例 #2
0
ファイル: user.go プロジェクト: wxaxiaoyao/linux
func init() {
	g_userMsgMgr = &UserMsgMgr{
		msgMap: safemap.New(),
	}
}