Crypric debug logging from ServiceStack Redis

We get loads of strange messages from different classes in ServiceStack.Redis namespace, these can be empty messages of contain R: 1 or similar

[14:11:28 DBG]
[14:11:28 DBG] R: $1869
[14:11:28 DBG]
[14:11:28 DBG] R: 1
[14:11:28 DBG]
[14:11:28 DBG] R: $1
[14:11:28 DBG]
[14:11:28 DBG] R: 0
[14:11:28 DBG]
[14:11:28 DBG] R: 1
[14:11:28 DBG]
[14:11:28 DBG] R: $0
[14:11:28 DBG]
[14:11:28 DBG] R: 0
[14:11:28 DBG]
[14:11:28 DBG] R: 1
[14:11:28 DBG]
[14:11:28 DBG] R: $0

What is this?

These look live verbose logging from ServiceStack.Redis when debug is enabled, which you can suppress with:

RedisConfig.DisableVerboseLogging = true;
1 Like

I disabled the verbose logging, now I am still getting empty debug level messages from ServiceStack.Redis.RedisPubSubServer and ServiceStack.Redis.BasicRedisResolver

Can you show an exact copy of the logging output?

I am using Serilog and these messages are collected in Seq. This is the JSON object for this message, it has empty text:

{
“Timestamp”: “2016-08-11T16:51:19.2001015+02:00”,
“Properties”: [
{
“Name”: “SourceContext”,
“Value”: “ServiceStack.Redis.RedisResolver”
},
{
“Name”: “name”,
“Value”: “Platform.Employee”
}
],
“MessageTemplateTokens”: [
{
“Text”: “”
}
],
“EventType”: “$00000000”,
“Level”: “Debug”,
“Id”: “event-f42bd5f7c1f608d325b5160000000000”,
“Links”: {
“Self”: “api/events/event-f42bd5f7c1f608d325b5160000000000{?download,render}”,
“Group”: “api/events/resources”
}
}

I’m not seeing anywhere where RedisResolver could log an empty message, maybe something’s up with the Serilog adapter?

I think so, I need to look at the adapter code, thanks.

I got a chance to look at the log adapter and found that indeed it logs message object as log event parameters, not as a message as such. What is the reason to have object message parameter, not string? Can I expect there anything else than string?

Not sure if I recall correctly but maybe so we didn’t need overloads to accept a StringBuilder or perhaps to be able to pass a complex entry down to the Log adapter they could inspect further. But looking at it now it looks like an unwise decision.

Does it make sense to put the Serilog adapter in the product repo? I can submit a PR. The only issue I see is the existing Nuget package. Not sure how to solve it though.

Seems Nick the maintainer of the ServiceStack.Logging.Serilog package has upgraded to use v4.0.50 but hasn’t published to NuGet yet, so I think if you send a PR to his project and give him a nudge he’ll publish it to NuGet as well: