I am a Serilog sink for Redis List
DEV | MASTER | BLEEDING | NUGET |
---|---|---|---|
Install-Package Serilog.Sinks.Redis.List
Log.Logger = new LoggerConfiguration()
.WriteTo.RedisList("localhost:6379", "MyConsoleApp")
.CreateLogger();
I am a Serilog sink for Redis
License: MIT License
I am getting following exception:
System.TypeLoadException: 'Method 'get_IsConnecting' in type 'Serilog.Sinks.Redis.List.NoConnectionMultiplexer' from assembly 'Serilog.Sinks.Redis.List, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.'
This is my code:
var logger = new LoggerConfiguration()
.WriteTo.RedisList("localhost:6379", "testKey")
.ReadFrom.Configuration(Configuration)
.CreateLogger();
I am using Serilog.Sinks.Redis.List version 1.3.1
When trying to install Serilog.Sinks.Redis.List, I am getting the message:
Unable to locate Serilog.Sinks.Redis.Core >= 1.0.0
Seems that Serilog.Sinks.Redis.Core was unlisted: https://www.nuget.org/packages/Serilog.Sinks.Redis.Core/1.0.0
I think Core was to supposed to be packaged together with List.
Given I have latest StackExchange.Redis installed, Error is as follows :
Could not load file or assembly 'StackExchange.Redis, Version=1.1.608.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
Please update the Redis package requirement to allow > 2.0 or provide alternate solution.
Hello i have a ASP NET Core
application where i am already using Serilog
for logging to Console
and also to a File
.
I will also need to write some special logs to a Redis
channel.
My question would be how can one choose which logs to write to a particular sink , in this case the Redis sink.
The log level is coming through as a number
The library gives no opportunity to change default value of restrictedToMinimumLevel
parameter, thus not all messages are end up in the log.
Serilog default is Verbose
. It would be nice to have this value configurable.
We have proved the changes done via the pull request (a20f21d) are working, can you create an official release of this package? I think other can also benefit from it :)
Logging framework probably shouldnt throw when it fails to connect to the Redis sink
Hi,
Great work! Thank you.
I was wondering why you are using LPUSH instead of RPUSH.
Wouldn't this cause the newest events being processed before the older events?
Cheers.
As per This StackOverflow question on reconnecting to Redis there is a configuration parameter that enables automatic reconnect if Redis is down when you attempt to connect for the first time.
The current version appears to replace ConnectionMultiplexer with NoConnectionMultiplexer which never attempts to reconnect, meaning that if Redis comes back up at some point the logging won't resume until your application restarts.
Adding support for abortOnFailConnect parameter would enable this workflow without having to manually work around it in this library.
How do you connect to a host with a password?
In our production netcore (v1.1.5 WebAPI + ReactJS) project, I'm unable to see the key we are using.
However in a sample netcore project (v1.1.5 WebAPI), it works fine.
Using redis-commander and docker we see:
redis-commander | loading key ".NET Web Api" from "redis:6379:0"
redis-commander | loading keys by prefix ""
In the our production project, we just see:
redis-commander | loading keys by prefix ""
redis-commander | found 1 keys for ""
In the controller I'm testing we're calling:
string myKey = "netcore1";
var log = new LoggerConfiguration()
.WriteTo.Console(theme: AnsiConsoleTheme.Code)
.WriteTo.RedisList("localhost:6379", myKey)
.CreateLogger();`
And issuing requests from Postman to avoid working through the UI.
The production project is fairly large and tearing it down and testing seems pretty daunting.
Where would you suggest debugging the serilog.redis.list code?
Need to make sure it doesnt throw when a batch cant send.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.