Neuron ESB User Network

The Service Bus for the Connected Business

When making a custom adapter (Neuron.Esb.Adapters.ESBAdapterBase), it is possible to raise an error event RaiseAdapterError.

 

Are there any possibility to log an event/message in a CustomPipelineStep?

Tags: CustomPipelineStep, Logging

Views: 362

Reply to This

Replies to This Discussion

If you want to add an event to the Neuron ESB v3 event log, use this from a code step:

System.Diagnostics.EventLog.WriteEntry("Neuron ESB v3", "<your event info>", System.Diagnostics.EventLogEntryType.Warning);

Why do we need to write directly to the Event Log? Isn't that the purpose of the RaiseAdapterError method?

The Neuron API.chm doc I have states in the Remarks section that "[RaiseAdapterError] Invokes OnAdapterError and logs the message into the Neuron ESB Windows event log." Is the documentation out of date? At the top of this entry it states: "Assembly:  Neuron.Esb (in Neuron.Esb.dll) Version: 2.5.0.0 (2.5.0.0)" I have version 3.1.0.275 installed and this doc was installed with it.

in your class, that derives from PipelineStep<ESBMessage>,  you can put functions like this to read the traceflags of the esb service runtime:

private bool IsDebug()
{
    return _traceSwitch.Level == TraceLevel.Verbose;
}

then, within your code, you can do trace statements like this:

if (IsDebug()) Neuron.Esb.Logging.ESBLoggingHelper.LogAppInfo(Neuron.Esb.Logging.ESBAppEventInfo.ESBAppEventSource.PipelineHelper, string.Format("Zip CleanFileName: Original = {0}. Cleaned = {1}: Topic = {2}. Party = {3}. Process = {4}. Process Step {5}. Message ID = {6}", original, fileName, context.Data.Header.Topic, context.Data.Header.SourceId, context.Instance.Pipeline.Name, context.Instance.CurrentStep.Name, context.Data.Header.MessageId));

there are LogAppInfo, LogAppWarning, LogAppError methods

I am using the following statement for logging from WFL step:

Neuron.Esb.Logging.ESBLoggingHelper.LogAppInfo(Neuron.Esb.Logging.ESBAppEventInfo.ESBAppEventSource.ClientContext,"####Starting####");

It is logging to Event Log.  Shouldn't it be logging to Neuron log?

RSS

Neuron ESB Product Support Forums and Communities

Latest Activity

Anupama Nair posted a discussion

Marketo Adapter Invalid Token

Hi,We are using the Marketo adapter to push account updates to Marketo. It works well for some time then starts failing with Invalid Token unless restarted. Is there a configuration that can be done so it can auto refresh the token when required?Thanks!See More
Nov 6, 2023
Sayantini Basak posted a discussion

Maximum payload size(REST API) for requests interfacing to NeuronESB

I am new to Neuron ESB and in our current scenario,We need to process batch transactions comprising of ~1000 records and send them to Neuron ESB for further processing. I would like to understand what is the maximum size of payload that can be transferred using REST interface to Neuron ESB.See More
Jul 22, 2022
Profile IconRobert E Dunie and Sayantini Basak joined Neuron ESB User Network
Apr 28, 2022
Profile IconDayanand, Frederic C, Steffen Greve-Oksfeldt and 1 more joined Neuron ESB User Network
Mar 16, 2022
Profile IconCam Vong and Mitja Luznar joined Neuron ESB User Network
Jan 27, 2022
Profile IconWill Hitzges, Chad Parsons, michael larsen and 4 more joined Neuron ESB User Network
Jun 11, 2021
Anupama Nair posted a discussion

ODBC stored proc polling with temporary tables

We have set up an ODBC adapter to poll a stored proc.We found that if the stored proc has a temporary table defined the rows returned are always 0.Any idea why this would be and what we can do to get around it?See More
Dec 14, 2020
Prasanth Kharade is now a member of Neuron ESB User Network
Dec 30, 2019

Badge

Loading…

© 2024   Created by Neuron Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service