@@ -63,7 +63,7 @@ public TaskOrchestrationContextWrapper(
6363 this . invocationContext = Check . NotNull ( invocationContext ) ;
6464 this . Properties = Check . NotNull ( properties ) ;
6565
66- this . logger = this . CreateReplaySafeLogger ( "Microsoft.DurableTask.Worker.Orchestration " ) ;
66+ this . logger = this . CreateReplaySafeLogger ( "Microsoft.DurableTask" ) ;
6767 this . deserializedInput = deserializedInput ;
6868 }
6969
@@ -541,30 +541,4 @@ string GetDefaultVersion()
541541
542542 return string . Empty ;
543543 }
544-
545- /// <inheritdoc/>
546- public override ILogger CreateReplaySafeLogger ( string categoryName )
547- {
548- // For orchestration logs, use dual-category logging if legacy categories are enabled
549- if ( categoryName == "Microsoft.DurableTask.Worker.Orchestration" &&
550- this . invocationContext . Options . Logging . UseLegacyCategories )
551- {
552- ILogger primaryLogger = this . LoggerFactory . CreateLogger ( categoryName ) ;
553- ILogger legacyLogger = this . LoggerFactory . CreateLogger ( "Microsoft.DurableTask" ) ;
554- ILogger dualLogger = new DualCategoryLogger ( primaryLogger , legacyLogger ) ;
555-
556- // Wrap the dual logger in a ReplaySafeLogger by calling the base implementation
557- // with a temporary category, then using reflection to replace the inner logger
558- var tempLogger = base . CreateReplaySafeLogger ( "temp" ) ;
559- var loggerField = tempLogger . GetType ( ) . GetField (
560- "logger" ,
561- System . Reflection . BindingFlags . NonPublic | System . Reflection . BindingFlags . Instance ) ;
562- loggerField ? . SetValue ( tempLogger , dualLogger ) ;
563-
564- return tempLogger ;
565- }
566-
567- // For all other categories, use the default behavior
568- return base . CreateReplaySafeLogger ( categoryName ) ;
569- }
570544}
0 commit comments