This project has moved. For the latest updates, please go here.

Encoding in message details

Mar 18, 2009 at 3:34 PM
Hi! Want to thank you for a nice tool! ;)
But it seems, that there are some problems with encodings in log messages.
I'm using UDPReceiver and russian symbols in messages looks like question marks in Message Details pane. Don't know where exactly is the problem, but in xml and plain text files generated by log4net everything is ok.

What are the key differences between Udp and Remoting receivers? Their functionality seems to be identical.

And I have some propositions for future:
  1. Where do you store application settings? Imho, you should store it in a user profile, so different users will have different settings.
  2. Message list pane redraw is awful. It is slow and blinks when lots of messages arrives.
  3. Search seems to be not very useful. Highlighting search result is not enough. It would be nice if there will be an option to hide records that don't match the search criteria. And to choose highlight color in settings.
  4. About multiple reсeivers you already know. I think that for multiple receivers it would be great to create a tabbed interface, so user can choose what receivers on what tab to display.
  5. As a user I really need a possibility to analyze static file content, not only newly added rows! Just open or D&D existing file, and mine its contents. Like in Chainsaw for example.
  6. It would be nice, to use some configurable thing for displaying messages in Message Details like xslt or some patterns

That it for now ;-)

Mar 18, 2009 at 4:29 PM
Hi Krigen

Thanks for the input.  I will investigate the issue the russion symbols.

Regarding the message draw, are referring to using UDP receiver, or file reciever.  I know the current release is really bad with the file receiver but that was improved in the last source code commit.  If you are referring to the UDP receiver then I'm really not sure what to do to make the screen refresh any faster, other than maybe rewriting the UI in WPF ;-)

Being able to analyse existing log files is probably next on my to-do list.  It is defintitely a feature that would be valuable.


Mar 18, 2009 at 5:42 PM
Hi Darrel.
Message redraw works the same both with Udp and File receivers (I didn't try Remoting).
I recieve 5 to 20 log messages by Udp and some of them can be around 10kb.

More ideas :-)
  1. DateTime pattern in settings. Someone needs to know millisecond, not only seconds. May be even just minutes, seconds and miliseconds.
  2. MessageId, like in Chainsaw. Imho it will be useful especially when using GroupByLogger = true.
Mar 22, 2009 at 1:37 AM
Hi Kriogen,

Thanks for the great feedback and the good propositions.

As you pointed out, redraw is not really optimized, I didn't focus on that for the 1st release, but Darrel did some work to improve it. But some rework is still needed, I'm not happy with the design, the view, the model and the controller are a bit mixed up!

The new version 1.1, published this week, supports multiple receivers (settings and receivers configuration are now separated), but all loggers are currently mixed together in the logger tree... a tab for each receiver could be nice, or maybe a column in the message list view... or maybe both, configurable :)

Good point on the settings, it's currently saved in the install directory, which is not a very good practice... should be easy to use user profile.

What do you mean by MessageId in your last idea?

Mar 23, 2009 at 12:09 PM
I suppose that MessageId is some kind of an order mark in which Log2Console receives messages. It will be useful with any type of message grouping (group by logger for example).

A new propositions about multiline log messages as usually ;) 
  1. Don't display whole message in message list view.  Show only first line of message, and whole message will be displayed in message details view, if user selects a row.
  2. Not all new line symbols processed correctly both in message details and message list views. Some of them looks like small squares. Check it.
  3. It seems that there some unnecessary list redraws. For example, when receiving message from turned off receiver.
Oct 28, 2010 at 2:32 PM
Edited Oct 28, 2010 at 7:14 PM

Hi, I love in UI Log2Console. But, I spend 6 hours, trying run NLog+Log2Console, and now I frustrated...

I'm too using UDPReceiver and russian symbols in messages looks like question marks in Message Details pane.

This problem can be solved? How I can Get russian symbols in Log2Console?

P.S.: and how to display milliseconds? Possible?

P.S.2: and may be new version would have layout, like loggers-layout for out to files, like this: "layout="${longdate} ${threadname} ${level} ${logger} ${message}". For control output columns and formats.


Oct 28, 2010 at 9:01 PM

Hi, you can download sources and chnage encoding by yourself. Find ASCII and change it to Unicode or something more suitable. 

I have another problem at the moment - I just can't receive any log message on Win7x64 by udp or remoting. So unfortunately I just get back to notepad...

Oct 28, 2010 at 10:01 PM
Edited Oct 30, 2010 at 8:18 AM

Thank compatriot, I try It.

I have win7*64, and when i try to use just TCP,  I cant recieve log message too.

Then, when i try to use TCP4, i get crash Log2Console with first message to log.

Now, UDP4 works nice.



Oct 28, 2010 at 10:59 PM

I try to change source in 2 places:

string loggingEvent = System.Text.Encoding.GetEncoding(1251).GetString(((MemoryStream)m.BodyStream).ToArray());




Jan 19, 2011 at 10:20 AM

for russian text try in UdpReceiver.cs

  string loggingEvent = System.Text.Encoding.GetEncoding(866).GetString(buffer);


in nlog.config

<target xsi:type="Network"
<layout xsi:type="Log4JXmlEventLayout"></layout>

Mar 23, 2011 at 1:20 PM

Just use

<target xsi:type="NLogViewer" name="viewer" address="udp://" encoding="utf-8"/>

Jan 5, 2016 at 3:09 PM
Edited Jan 5, 2016 at 3:12 PM
For russian symbols in Message Datail you need change class LogMessage

    public string GetMessageDetails()
        var sb = new StringBuilder();
        sb.Append(@"{\rtf1\ansi ");

    public string GetMessageDetails()
        var sb = new StringBuilder();