Hi Guys
I have been trying to build my first ever Service Interceptor but I have hit a few issues and wondered if any of you guys could help! In an attempt to get this to work I have just tried to write a line in the Tessitura Log as per Ryan's "Hello World" interceptor but I still can't even get this to write in to the log! Any help would be great.
I have put together a very simple interceptor that looks like below and built in visual studio and copied over DLL to the plugins folder. I have enabled both plugs and reload plugin config.
using Tessitura.Services.Common.Interceptor.Client;using Tessitura.Services.Common.Logger;namespace Tessitura.WMC.Interceptor{public class HelloInterceptor{ public static PluginData Operation(PluginData input) { input.Logger.Trace("Hello World!!"); return input; }
}}
I have registered this as a plugin like so in the xml doc.
<PluginConfigs> <PluginConfig> <UriMatch>CRM/*</UriMatch> <Verb>GET</Verb> <FullPluginName>Tessitura.WMC.Interceptor.HelloInterceptor</FullPluginName> <PluginPlacement>POST</PluginPlacement> </PluginConfig></PluginConfigs>
I have looked in the TessituraService Logs and I can't see anything that might cause a problem! I did have a typo in my XML which I did fix. So a bit stuck on how to get the "Hello World" to appear in the logs. I have tried load of different UriMatches including <UriMatch>CRM/Constituents/*/Snapshot</UriMatch> but still nothing appears in the logs after I search for and open a constituent record.
Do you guys have anything that you think i should check? Any help would be much appreciated!
Thanks
Nick
Hi Nick,
Forgive me if I'm suggesting something you already did, but I didn't see mention of this in your message... Did you set the logger Trace level in the NLog.config file of the Tessitura services? Specifically, this line which should be near the end of the file:
<logger name="*" minlevel="Trace" writeTo="file" enable="true"/>
Once you set that, you'll end up with a verbose log which will show specifics on when plugins are fired - useful when developing these things.
If you already did that, we'll move on to other possibilities.
Thanks,David