michaelpearce-gain commented on a change in pull request #4: AMQNET-589:
Failover implementation
URL: https://github.com/apache/activemq-nms-amqp/pull/4#discussion_r303768691
##########
File path: src/NMS.AMQP/Transport/TransportContext.cs
##########
@@ -41,6 +41,49 @@ internal TransportContext()
connectionBuilder.SASL.Profile = Amqp.Sasl.SaslProfile.Anonymous;
}
+ static TransportContext()
+ {
+ //
+ // Set up tracing in AMQP. We capture all AMQP traces in the
TraceListener below
+ // and map to NMS 'Tracer' logs as follows:
+ // AMQP Tracer
+ // Verbose Debug
+ // Frame Debug
+ // Information Info
+ // Output Info (should not happen)
+ // Warning Warn
+ // Error Error
+ //
+ Amqp.Trace.TraceLevel = Amqp.TraceLevel.Verbose |
Amqp.TraceLevel.Frame;
+ Amqp.Trace.TraceListener = (level, format, args) =>
+ {
+ switch (level)
+ {
+ case Amqp.TraceLevel.Verbose:
+ case Amqp.TraceLevel.Frame:
+ Tracer.DebugFormat(format, args);
+ break;
+ case Amqp.TraceLevel.Information:
+ case Amqp.TraceLevel.Output:
+ //
+ // Applications should not access AmqpLite directly so
there
+ // should be no 'Output' level logs.
+ Tracer.InfoFormat(format, args);
+ break;
+ case Amqp.TraceLevel.Warning:
+ Tracer.WarnFormat(format, args);
+ break;
+ case Amqp.TraceLevel.Error:
+ Tracer.ErrorFormat(format, args);
+ break;
+ default:
Review comment:
deleting ignore, just realised thats the title of the columns
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services