Encoding Base64


Author
Message
SD
SD
New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)
Group: Forum Members
Posts: 2, Visits: 5
Hello, I use your product for the analysis of RabbitMQ trace logs, I configured the parser and logs are displayed, but the message (Payload) is encoded by Base64, I would like to ask if any built-in tools that would immediately decode the message (Payload) in plain text?
LogViewPlus Support
LogViewPlus Support
Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
Hi,

There is no solution at the moment, but this functionality would be relatively easy to implement as a Custom Post Processor where you just decode and then modify the Message:
https://www.logviewplus.com/docs/post_processors.html

You can find sample code for custom extensions here:
http://www.logviewplus.com/dist/LogViewPlus_Samples.zip
https://www.logviewplus.com/docs/running_the_samples.html

I think this functionality is a both helpful and a bit niche.  It would be good to put it into the application, but I wouldn't want to confuse users who are not interested.  I will need to think a bit about how that could be done.

Thanks,

Toby

SD
SD
New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)New Member (34 reputation)
Group: Forum Members
Posts: 2, Visits: 5
Thanks, it's working.
If anyone needs it, here's the code:
        public void Modify(LogEntry newEntry)
{
var message = newEntry.Message;
var base64EncodedBytes = System.Convert.FromBase64String(message);
newEntry.Message = System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
}

LogViewPlus Support
LogViewPlus Support
Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
Glad to hear you got it working and thanks for posting your solution!  I will try and think of a way these snippets can be more easily shared.

Toby
Edited 5 Years Ago by LogViewPlus Support
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Login

Explore
Messages
Mentions
Search