“Note: We recommend you to use the the Log , BuildClient , and RunWorkflow methods through the services class and their corresponding services, instead of using them as standalone, readily available methods.”
Why is services.OutputLoggerService.Log() preferential to just doing Log()? I want to better understand why this new guideline exists so I can get the most out of it.
Log() and services.OutputLoggerService.Log() end up doing the same thing today, but UiPath is standardizing everything around the ICodedWorkflowServices services entry point.
Using the service version makes the dependency explicit, plays nicely with the DI container nd gives UiPath room to extend or swap logging behavior later without changing your code.
So for new coded workflows it’s safer to follow the guideline and use: