Open
Conversation
/tmp/dotnet-logger-repro/Worker cat Program.cs
using Microsoft.Extensions.Logging;
using Temporalio.Client;
using Temporalio.Common.EnvConfig;
using Temporalio.Worker;
var connectOptions = ClientEnvConfig.LoadClientConnectOptions();
connectOptions.TargetHost ??= "localhost:7233";
connectOptions.LoggerFactory = LoggerFactory.Create(builder =>
builder.
AddSimpleConsole(options => options.TimestampFormat = "[HH:mm:ss] ").
SetMinimumLevel(LogLevel.Information));
var client = await TemporalClient.ConnectAsync(connectOptions);
/tmp/dotnet-logger-repro/Worker dotnet build
MSBuild version 17.8.49+7806cbf7b for .NET
Determining projects to restore...
All projects are up-to-date for restore.
/private/tmp/dotnet-logger-repro/Worker/Program.cs(8,32): error CS0103: The name 'LoggerFactory' does not exist in the current context [/private/tmp/dotnet-logger-repro/Worker/Worker.csproj]
Build FAILED.
/private/tmp/dotnet-logger-repro/Worker/Program.cs(8,32): error CS0103: The name 'LoggerFactory' does not exist in the current context [/private/tmp/dotnet-logger-repro/Worker/Worker.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.64
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📖 Docs PR preview links
|
dandavison
commented
Apr 23, 2026
| connectOptions.LoggerFactory = LoggerFactory.Create(builder => | ||
| builder. | ||
| AddSimpleConsole(options => options.TimestampFormat = "[HH:mm:ss] "). | ||
| SetMinimumLevel(LogLevel.Information)); |
Contributor
Author
There was a problem hiding this comment.
/tmp/dotnet-logger-repro/Worker cat Program.cs
using Microsoft.Extensions.Logging;
using Temporalio.Client;
using Temporalio.Common.EnvConfig;
using Temporalio.Worker;
var connectOptions = ClientEnvConfig.LoadClientConnectOptions();
connectOptions.TargetHost ??= "localhost:7233";
connectOptions.LoggerFactory = LoggerFactory.Create(builder =>
builder.
AddSimpleConsole(options => options.TimestampFormat = "[HH:mm:ss] ").
SetMinimumLevel(LogLevel.Information));
var client = await TemporalClient.ConnectAsync(connectOptions);
/tmp/dotnet-logger-repro/Worker dotnet build
MSBuild version 17.8.49+7806cbf7b for .NET
Determining projects to restore...
All projects are up-to-date for restore.
/private/tmp/dotnet-logger-repro/Worker/Program.cs(8,32): error CS0103: The name 'LoggerFactory' does not exist in the current context [/private/tmp/dotnet-logger-repro/Worker/Worker.csproj]
Build FAILED.
/private/tmp/dotnet-logger-repro/Worker/Program.cs(8,32): error CS0103: The name 'LoggerFactory' does not exist in the current context [/private/tmp/dotnet-logger-repro/Worker/Worker.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.64
dandavison
commented
Apr 23, 2026
| ```go | ||
| handle := c.GetActivityHandle(client.GetActivityHandleOptions{ | ||
| ActivityID: "my-standalone-activity-id", | ||
| ActivityID: "standalone_activity_helloworld_ActivityID", |
Contributor
Author
There was a problem hiding this comment.
Reuse activityID from earlier in the page so the code works if they've run the code above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Make Go and .NET code work when followed naively from the docs.
┆Attachments: EDU-6260 SAA docs tweaks