Documentation

Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers
v7.18

Debug Performance

In your websites root Ucommerce folder, you will find a debug folder. The directory will look similar to this: \ucommerce\Apps\Debug

In the debug folder you'll find examples of ways to use 'partial components' to enable debugging.

To enable either of the standard debugging facilities, simply remove the '.example' extension on the files, and they will be picked up during application start.

Enable-Debug-On-

'Enable-Debug-On-Basket-Pipeline.config.example'

Will patch the property called Debug on the basket pipeline, by setting the value to True. This will enable logging of the basket pipeline, writing out execution time of each task in the log file. This can be enabled for all registered components in the container including your own components. This also includes pipelines and services.

Enable-Timing-On-

'Enable-Timing-On-ScratchIndexer.config.example'

Will enable a timing interceptor on the component, that will measure the execution time on any given method called. This can be enabled for all registered components in the container including your own components. This also includes pipelines and services.

Write-Config-To-File

'Write-Config-To-File.config.example'

Will enable writing out the full structure of the final configuration file, after everything has been patched and replaced. Find the full configuration file under: '~/App_Data/TEMP/Ucommerce.config'

Dump-Basket-To-Log-In-Basket-Pipeline

'Dump-Basket-To-Log-In-Basket-Pipeline.config.example'

Formats the basket nicely and outputs it to the logs. This is useful for checking the status of your basket in the checkout process.

You can insert this logging task anywhere in the Basket Pipeline by changing the <value insert="after"> similar to when doing Pipeline Tasks.

Read more about how to do that here.

Performance measurements of components

From version 6.7.3, it is now possible to log performance measurements for any component, without changing the component itself.

Simply add a partial component configuration to your custom configuration, that adds the TimingInterceptor component.

In this example, timing is added to the TaxService.

    
    <configuration>
    	<components>
    		<partial-component id="TaxService">
    			<interceptors>
    				<interceptor>${TimingInterceptor}</interceptor>
    			</interceptors>
    		</partial-component>
    	</components>
    </configuration>