Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions asm_amd64.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// func goID() int64
TEXT ·goID(SB),NOSPLIT,$0-8
MOVQ TLS, CX
MOVQ 0(CX)(TLS*1), AX
MOVQ AX, ret+0(FP)
RET
5 changes: 5 additions & 0 deletions format.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ var formatterFuncs = map[string]FormatterFunc{
"UTCNs": formatterUTCNs,
"n": formattern,
"t": formattert,
"GoID": formatterGoID,
}

var formatterFuncsParameterized = map[string]FormatterFuncCreator{
Expand Down Expand Up @@ -430,6 +431,10 @@ func formattert(message string, level LogLevel, context LogContextInterface) int
return "\t"
}

func formatterGoID(message string, level LogLevel, context LogContextInterface) interface{} {
return goID()
}

func createDateTimeFormatterFunc(dateTimeFormat string) FormatterFunc {
format := dateTimeFormat
if format == "" {
Expand Down
3 changes: 3 additions & 0 deletions goid.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package seelog

func goID() int64