go.temporal.io/server/temporaltest/logger.go

41 LOC · 13 covered · 28 uncovered · 5 ranges · 21 concepts · 4 introducers · 6 tests

File neighbourhood

The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the related-file, concept, and source links on this page.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the filego.temporal.io/server/api/historyservice/v1/request_response.pb.go · 12003 LOCv1/request_response.pb.g…go.temporal.io/server/api/historyservice/v1/service_grpc.pb.go · 3373 LOCv1/service_grpc.pb.gogo.temporal.io/server/client/history/client_gen.go · 1548 LOChistory/client_gen.gogo.temporal.io/server/client/history/metric_client_gen.go · 1046 LOChistory/metric_client_ge…go.temporal.io/server/client/history/retryable_client_gen.go · 1152 LOChistory/retryable_client…go.temporal.io/server/client/matching/client.go · 535 LOCmatching/client.gogo.temporal.io/server/common/dynamicconfig/static_client.go · 31 LOCdynamicconfig/static_cli…go.temporal.io/server/common/namespace/nsregistry/registry.go · 898 LOCnsregistry/registry.gogo.temporal.io/server/service/frontend/workflow_handler.go · 7521 LOCfrontend/workflow_handle…go.temporal.io/server/service/history/handler.go · 2627 LOChistory/handler.gogo.temporal.io/server/service/history/workflow/mutable_state_impl.go · 9930 LOCworkflow/mutable_state_i…go.temporal.io/server/service/history/workflow/workflow_task_state_machine.go · 1602 LOCworkflow/workflow_task_s…go.temporal.io/server/service/matching/handler.go · 726 LOCmatching/handler.gogo.temporal.io/server/temporaltest/server.go · 172 LOCtemporaltest/server.goworkflow_handler.go ×11 · 117 introduced LOCworkflow_handler.go ×11common.go ×1 · 11 introduced LOCcommon.go ×1request_response.pb.go ×6 · 246 introduced LOCrequest_response.pb.go ×…visibility_store.go ×17 · 171 introduced LOCvisibility_store.go ×17telemetry.go ×2 · 15 introduced LOCtelemetry.go ×2TestNewServer · 0 introduced LOCTestNewServerpri_matcher.go ×1 · 2 introduced LOCpri_matcher.go ×1timer_queue_active_task_executor.go ×1 · 3 introduced LOCtimer_queue_active_task_…workflow_task_completed_handler.go ×9 · 75 introduced LOCworkflow_task_completed_…pri_forwarder.go ×2 · 4 introduced LOCpri_forwarder.go ×2request_response.pb.go ×1 · 7 introduced LOCrequest_response.pb.go ×…logger.go ×1 · 5 introduced LOClogger.go ×1logger.go ×1 · 2 introduced LOClogger.go ×1pri_matcher.go ×1 · 4 introduced LOCpri_matcher.go ×1workflow_handler.go ×8 · 144 introduced LOCworkflow_handler.go ×8pri_matcher.go ×1 · 2 introduced LOCpri_matcher.go ×1handler.go ×1 · 20 introduced LOChandler.go ×1pri_matcher.go ×8 · 55 introduced LOCpri_matcher.go ×8matching_engine.go ×1 · 8 introduced LOCmatching_engine.go ×1server.go ×1 · 3 introduced LOCserver.go ×1logger.go ×2 · 21 introduced LOClogger.go ×2ExampleNewServer · introduced test · go.temporal.io/server/temporaltest/ExampleNewServerExampleNewServerTestClientWithCustomInterceptor · introduced test · go.temporal.io/server/temporaltest/TestClientWithCustomInterceptorTestClientWithCustomInte…TestDefaultWorkerOptions · introduced test · go.temporal.io/server/temporaltest/TestDefaultWorkerOptionsTestDefaultWorkerOptionsTestNewServer · introduced test · go.temporal.io/server/temporaltest/TestNewServerTestNewServerTestNewWorkerWithOptions · introduced test · go.temporal.io/server/temporaltest/TestNewWorkerWithOptionsTestNewWorkerWithOptionsTestSearchAttributeRegistration · introduced test · go.temporal.io/server/temporaltest/TestSearchAttributeRegistrationTestSearchAttributeRegis…Focused file · go.temporal.io/server/temporaltest/logger.go · 41 LOCtemporaltest/logger.go

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.

1 package temporaltest
2
3 import (
4 "testing"
5
6 "go.temporal.io/sdk/log"
7 )
8
9 var _ log.Logger = &testLogger{}
10
11 // testLogger implements a Go SDK logger by writing to the test output.
12 //
13 // Text will be printed only if the test fails or the -test.v flag is set.
14 type testLogger struct {
15 t *testing.T
16 }
17
18 > func (tl *testLogger) logLevel(lvl, msg string, keyvals ...any) { logger.go ×2
19 > if tl.t == nil {
20 > return logger.go ×1
21 > }
22 > args := []any{lvl, msg} logger.go ×1
23 > args = append(args, keyvals...)
24 > tl.t.Log(args...)
25 }
26
27 > func (tl *testLogger) Debug(msg string, keyvals ...any) { workflow_handler.go ×8
28 > tl.logLevel("DEBUG", msg, keyvals)
29 > }
30
31 > func (tl *testLogger) Info(msg string, keyvals ...any) { logger.go ×2
32 > tl.logLevel("INFO ", msg, keyvals)
33 > }
34
35 func (tl *testLogger) Warn(msg string, keyvals ...any) {
36 tl.logLevel("WARN ", msg, keyvals)
37 }
38
39 func (tl *testLogger) Error(msg string, keyvals ...any) {
40 tl.logLevel("ERROR", msg, keyvals)
41 }