Fluent logger log to Fluent Bit - fluentd

Can Fluent logger log to Fluent Bit remotely? If yes, how?

Fluent logger uses Fluentd Forward protocol, so Fluent Bit can receive logs from Fluent logger. Check the document.

Related

How to log a Serilog LogEvent to ILogger?

I got a microservice .NET Core that receives a Serilog.Events.LogEvent though a external source. The Microservice implements the UseSerilog whitch mean that the injected Microsoft ILogger will be a disguised Serilog.
The question is how I log my LogEvent from within this class that only got a Microsoft ILogger?
I tried to cast the Microsoft ILogger to a Serilog ILogger but that was not possible.
MS Ilogger is supposed to make it easy to switch logging systems, all a class needs to know about should be the MS Ilogger. But in this case, I took a shortcut, I simple injected a Serilog ILogger and then used this to log the LogEvent.
This is a very small standalone project so it should not be a problem. Besides, to get Serilog structure logging working one must use a specific syntax, this might not be the same if the log system is changed.

Solace Spring Cloud Stream Binder AMQP(S)

I would like to connect my Spring Boot application to a Solace PubSub+ instance using the following URL amqps://localhost:5671. I would like to use Spring Cloud Stream and Solace Spring Cloud Stream Binder for that.
I tried the following configuration in my application.yml:
solace:
java:
host: amqps://localhost:5671
clientUsername: admin
clientPassword: admin
But this does not work. I keep getting errors that amqps is not a valid scheme. Same goes for plain amqp:// URIs.
I have dug a little deeper into the code of Solace Spring Cloud Stream Binder, and I am not sure this is actually possible at all. It seems the configuration above only works for tcp:// and tcps:// URIs, both resulting in messages being sent over Solace's proprietary SMF protocol.
This works:
solace:
java:
host: tcp://localhost:55555
clientUsername: admin
clientPassword: admin
... but does not use AMQP but SMF.
How can I configure Solace Spring Cloud Stream Binder to communicate via AMQP and AMQPS?
The Spring Cloud Stream binders from Solace do not support AMQP. They are written using the Solace Java API JCSMP and use SMF, which you have observed.
I am not sure if there is a community SCS binder using AMQP 1.0. Is there a reason you need it to work in AMQP 1.0?

Vertx: Log4j2 without using the vertx logger factory

I would like to use Log4j2 without losing its API like passing lambdas for lazy loading.
So, I would like to avoid to use Vertx LoggerFactory (returning generic Logger API) and use the Log4j2 directly.
Is there any serious drawback to consider when Log4j2 is used directly without using the Vertx logger factory?
Thank you
There's no serious drawback and it's rather the opposite: use log4j2 without going through Vert.x logging!
Vert.x logging is deprecated and will be completely internal in the future.
I tried to use log4j2 directly without using org.slf4j.Logger, however it seems that custom appenders are created twice, once by log4j2 and then once by vertx.

How to enable query logging in Kairosdb?

I want to see which queries Kairosdb receives from my application and from others. How can I enable query logging?
I do not know a simple solution for that, AFAICT it is not available for configuring in kairosDB. The easier is to use a proxy.
Otherwise you may create a KairosDB plugin that adds a logger to the embedded jetty instance.

Logging with context information

I am working on a greenfield project and I want to integrate serilog with ninject.
The use case is as follows:
There are a number of common libraries
These libraries are used in a number of modules i.e plugins. These plugins each receive a GUID at run time which is unique. This
is a base property on an abstract plugin class which every
implementation of a plugin inherits
We want to append this unique name to every log message that a plugin makes
as well as any calls to the common libraries from that plugin so that a log
message can be traced to the unique instance of a plugin that made it
We would prefer not to modify each class in the common libraries to take in a logger to use to log
My thoughts were to :
Create a singleton logger provider. This will be called by anything needing to log.
Use postsharp and CallContext.LogicalSetData to set the GUID prior to any call to the logging provider
Use CallContext.LogicalGetData to get the GUID in the singleton logger provider. This will either retrieve an existing logger for that GUID using Logger.ContextFor or create a new one to add to a dictionary.
Use Ninject to resolve the ILoggerProvider to the singleton provider always when requested
Before I down this circuitious route, is there a better way to do this, maybe with ninject?
Thanks for reading.
I went with the solution as described but due to it being a singleton there was no need for ninject in the end.
The solution is working and doesnt seem to have any performance issues logging at high volumes

Resources