MCPcopy Index your code
hub / github.com/php/frankenphp / getLogger

Function getLogger

frankenphp.go:672–689  ·  view source on GitHub ↗
(threadIndex C.uintptr_t)

Source from the content-addressed store, hash-verified

670}
671
672func getLogger(threadIndex C.uintptr_t) (*slog.Logger, context.Context) {
673 ctxHolder := phpThreads[threadIndex]
674 if ctxHolder == nil {
675 return globalLogger, globalCtx
676 }
677
678 ctx := ctxHolder.context()
679 if ctxHolder.handler == nil {
680 return globalLogger, ctx
681 }
682
683 fCtx := ctxHolder.frankenPHPContext()
684 if fCtx == nil || fCtx.logger == nil {
685 return globalLogger, ctx
686 }
687
688 return fCtx.logger, ctx
689}
690
691//export go_log
692func go_log(threadIndex C.uintptr_t, message *C.char, level C.int) {

Callers 2

go_logFunction · 0.85
go_log_attrsFunction · 0.85

Calls 2

contextMethod · 0.65
frankenPHPContextMethod · 0.65

Tested by

no test coverage detected