22

We have a custom event that gets fired on Save Component when we use Tridion UI and we had some issue with the code that we implemented. To troubleshoot it efficiently we need some logging put in place.

What is the best way to do logging from the Tridion Custom events C# code? Is there something that we could use coming from the Tridion API or do we need to plug one of the existing logging frameworks like log4net, NLog, etc. into our code and if we do that how should we load the configuration?

Thank you

24

I would say: use log4net. You could try hooking into Tridion.Logging, but this DLL is not intended for implementer usage, and its configuration is buried deep in the Tridion.ContentManager.Config file which I would really only modify when absolutely needed.

3

I would suggest to use NLog.dll. When I configured my custom events to use NLog, it was really handy and I can set my own file naming format. You can also extend the NLog.

You have to add the nlog.config and NLog.dll in the same location of Dll.

If you are trying to logging for the Dll which is in GAC then you should use log4net.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.