<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-6194</id>
	<title>Nabble - NLog-list</title>
	<updated>2008-11-16T14:07:21Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/NLog-list-f6194.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-list-f6194.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-20530692</id>
	<title>Re: NLog and ASP.NET / Medium Trust</title>
	<published>2008-11-16T14:07:21Z</published>
	<updated>2008-11-16T14:07:21Z</updated>
	<author>
		<name>Andrew Stone-3</name>
	</author>
	<content type="html">&lt;div&gt;&lt;br&gt;&lt;/div&gt;On this topic.... I have a production server that behaves&amp;nbsp;differently&amp;nbsp;to the corresponding test and dev boxes?&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&amp;nbsp;${callsite} is&amp;nbsp;returning&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;quot;&lt;font color=&quot;#000000&quot;&gt;NLog.LoggerImpl.Write&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I was thinking this&amp;nbsp;might&amp;nbsp;be a reflection/trust issue?&amp;nbsp;anyone&amp;nbsp;know of anything else that might cause this behavior?&lt;/div&gt;&lt;div&gt;same code works fine on my test and dev machines?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;
Cheers,&lt;/div&gt;&lt;div&gt;Stonie.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2008/11/15 Jaroslaw Kowalski &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20530692&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jaak@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;






&lt;div bgcolor=&quot;#ffffff&quot;&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;It&amp;#39;s on my todo list for V2. I&amp;#39;m not sure to what 
extent this is possible, given how reflection-intensive NLog is but I&amp;#39;ll give it 
a try.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;Jarek&lt;/font&gt;&lt;/div&gt;
&lt;blockquote style=&quot;border-left:#000000 2px solid;padding-left:5px;padding-right:0px;margin-left:5px;margin-right:0px&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;Wj3C7c&quot;&gt;
  &lt;div style=&quot;font:10pt arial&quot;&gt;----- Original Message ----- &lt;/div&gt;
  &lt;div style=&quot;font:10pt arial;background:#e4e4e4&quot;&gt;&lt;b&gt;From:&lt;/b&gt; 
  &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20530692&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glenn_lanier@...&lt;/a&gt; &lt;/div&gt;
  &lt;div style=&quot;font:10pt arial&quot;&gt;&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20530692&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nlog-list@...&lt;/a&gt; 
  &lt;/div&gt;
  &lt;div style=&quot;font:10pt arial&quot;&gt;&lt;b&gt;Sent:&lt;/b&gt; Friday, November 14, 2008 11:00 
  AM&lt;/div&gt;
  &lt;div style=&quot;font:10pt arial&quot;&gt;&lt;b&gt;Subject:&lt;/b&gt; [Nlog-list] NLog and &lt;a href=&quot;http://ASP.NET&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;ASP.NET&lt;/a&gt; / 
  Medium Trust&lt;/div&gt;
  &lt;div&gt;&lt;br&gt;&lt;/div&gt;Is there any way to run NLog in a medium trust environment (&lt;a href=&quot;http://ASP.NET&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;ASP.NET&lt;/a&gt;)?&amp;nbsp;
  &lt;div&gt;&lt;br&gt;&lt;/div&gt;
  &lt;div&gt;--G&lt;/div&gt;
  &lt;/div&gt;&lt;/div&gt;&lt;p&gt;
  &lt;/p&gt;&lt;hr&gt;

  &lt;p&gt;&lt;/p&gt;-------------------------------------------------------------------------&lt;br&gt;This 
  SF.Net email is sponsored by the Moblin Your Move Developer&amp;#39;s 
  challenge&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp;amp; 
  win great prizes&lt;br&gt;Grand prize is a trip for two to an Open Source event 
  anywhere in the 
  world&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;amp;url=/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;amp;url=/&lt;/a&gt;
  &lt;p&gt;
  &lt;/p&gt;&lt;hr&gt;

  &lt;p&gt;&lt;/p&gt;_______________________________________________&lt;br&gt;Nlog-list mailing 
  list&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20530692&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;br&gt;-------------------------------------------------------------------------&lt;br&gt;
This SF.Net email is sponsored by the Moblin Your Move Developer&amp;#39;s challenge&lt;br&gt;
Build the coolest Linux based applications with Moblin SDK &amp;amp; win great prizes&lt;br&gt;
Grand prize is a trip for two to an Open Source event anywhere in the world&lt;br&gt;
&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;amp;url=/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________&lt;br&gt;
Nlog-list mailing list&lt;br&gt;
&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20530692&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Kind regards,&lt;br&gt;----------------------------------------&lt;br&gt;Andrew Stone&lt;br&gt;Microsoft .NET Consultant&lt;br&gt;&lt;br&gt;AndrewStone.net&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20530692&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mailbox@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://andrewstone.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://andrewstone.net&lt;/a&gt;&lt;br&gt;+61 (0)412 488 251&lt;br&gt;----------------------------------------&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20530692&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-and-ASP.NET---Medium-Trust-tp20506532p20530692.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20530778</id>
	<title>Re: New feature coming to NLog v2 - wrapper layout renderers</title>
	<published>2008-11-16T13:46:11Z</published>
	<updated>2008-11-16T13:46:11Z</updated>
	<author>
		<name>Andrew Stone-3</name>
	</author>
	<content type="html">&lt;div&gt;Jarek,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;If it&amp;#39;s about making the code base more testable and maintainable sounds like a great idea.&amp;nbsp;&lt;div&gt;&lt;div&gt;You have done such a great job of 1.x! It&amp;#39;s easy to use and has great performance.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Keep up the great work, NLog really is the best logging block for .NET.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Cheers,&lt;/div&gt;&lt;div&gt;Stonie.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2008/11/15 Jaroslaw Kowalski &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20530778&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jaak@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;





&lt;div bgcolor=&quot;#ffffff&quot;&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;With the code cleanup that&amp;#39;s happening in NLog 
v2&amp;nbsp;branch I realized that I could easily add a cool feature: Wrapper Layout 
Renderers which would help me restructure code to make it more maintainable and 
testable.&amp;nbsp;I&amp;#39;d like to year your opinion about it.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;What are Wrapper Layout Renderers 
(WLRs)?&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;Similar to wrapper targets, WLRs can modify output 
of other layout renderers, by doing textual transformations like:&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;* uppercase/lowercase conversion&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;* padding, trimming, alignment&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;* search/replace&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;*&amp;nbsp;elision of excessive text&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;* encryption / masking of sensitive 
information&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;*&amp;nbsp;cryptographic transformations (calculating 
MD5, SHA1 hashes, HMAC checksums)&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;* encoding: base64/uuencode, etc.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;etc.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;Note that many of those concerns are currently (in 
NLog&amp;nbsp;v1) handled by LayoutRenderer itself. Being able to separate them into 
standalone, extensible&amp;nbsp;classes is very convenient as you can add them 
separately and all existing layout renderers will be able to benefit from 
them.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;So how are they used:&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;${uppercase:${level}} - will print log level in 
uppercase&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;${rot13:${message}} -&amp;nbsp; will print ROT13 
&amp;quot;encrypted&amp;quot; message&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;For config-file-level compatibility, you will still 
be able to use uppercase,lowercase,padding attributes that you know from NLog v1 
directly on layout renderers etc. &lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;font color=&quot;#a31515&quot; face=&quot;Courier New&quot;&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;To implement a wrapper, all you have to do is to 
create a class derived from WrapperLayoutRendererBase that overrides the 
Transform() method and apply the usual LayoutRenderer attribute.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;Here&amp;#39;s the ROT13 wrapper, which implements Caesar&amp;#39;s 
cipher.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot;&gt;
&lt;p&gt;[&lt;/p&gt;&lt;/font&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;LayoutRenderer&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;(&lt;/font&gt;&lt;font color=&quot;#a31515&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#a31515&quot; size=&quot;2&quot;&gt;&amp;quot;rot13&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;)]&lt;br&gt;
&lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;sealed&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;class&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; 
&lt;/font&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;Rot13LayoutRendererWrapper&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;: &lt;/font&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;WrapperLayoutRendererBase&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;{&lt;br&gt;&lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
protected&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;override&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; Transform(&lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; text)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
{&lt;br&gt;&lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; DecodeRot13(text);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;}&lt;/font&gt;
&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;You can of course define public properties as be able 
to set their values as with regular layout renderers. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;I&amp;#39;m planning to add an additional concept called 
ambient properties which will help maintain NLog v1 compatibility while being 
very extensible. Ambient properties are properties that appear as if they were 
&lt;/font&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;present on all layout renderers and when you 
actually use them, they add an implicit wrapper. This allows you to write: 
&lt;/font&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;${level:uppercase=true:padding=-10} &lt;/font&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;instead of: ${padding:padding=-10:&lt;/font&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;${uppercase:${level}}}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;Whenever layout parser encounters an unknown property 
(such as &amp;quot;uppercase&amp;quot; which doesn&amp;#39;t exist on LevelLayoutRenderer anymore) it will 
look for layout renderers which define [AmbientProperty(&amp;quot;UpperCase&amp;quot;)] and will 
instantiate them and use to wrap the original layout renderer:&lt;/font&gt;&lt;/p&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;font size=&quot;2&quot;&gt;
&lt;p&gt;[&lt;/p&gt;&lt;/font&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;LayoutRenderer&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;(&lt;/font&gt;&lt;font color=&quot;#a31515&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#a31515&quot; size=&quot;2&quot;&gt;&amp;quot;uppercase&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;)]&lt;br&gt;
[&lt;/font&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;AmbientProperty&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;(&lt;/font&gt;&lt;font color=&quot;#a31515&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#a31515&quot; size=&quot;2&quot;&gt;&amp;quot;UpperCase&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;)]&lt;br&gt;
&lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;sealed&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;class&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; 
&lt;/font&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;UpperCaseLayoutRendererWrapper&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; : &lt;/font&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#2b91af&quot; size=&quot;2&quot;&gt;WrapperLayoutRendererBase&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;{&lt;br&gt;&lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
private&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;bool&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; _upperCase = &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;false&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;;&lt;br&gt;
&lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;bool&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; 
UpperCase&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
get&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; { &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;return&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; _upperCase; 
}&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;set&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; { _upperCase = 
&lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;value&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
protected&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;override&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; Transform(&lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; text)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;&lt;font color=&quot;#0000ff&quot; size=&quot;2&quot;&gt;return&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt; UpperCase ? 
text.ToUpperInvariant() : text;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=&quot;2&quot;&gt;}&lt;/font&gt;
&lt;p&gt;I have some prototype code on my box and I will check in for others to play 
with as soon as I get this to a stable state.&lt;/p&gt;
&lt;p&gt;What do you think? &lt;/p&gt;
&lt;p&gt;Jarek&lt;/p&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;
&lt;br&gt;-------------------------------------------------------------------------&lt;br&gt;
This SF.Net email is sponsored by the Moblin Your Move Developer&amp;#39;s challenge&lt;br&gt;
Build the coolest Linux based applications with Moblin SDK &amp;amp; win great prizes&lt;br&gt;
Grand prize is a trip for two to an Open Source event anywhere in the world&lt;br&gt;
&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;amp;url=/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________&lt;br&gt;
Nlog-list mailing list&lt;br&gt;
&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20530778&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20530778&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/New-feature-coming-to-NLog-v2---wrapper-layout-renderers-tp20516838p20530778.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20516836</id>
	<title>Re: NLog and ASP.NET / Medium Trust</title>
	<published>2008-11-14T20:22:47Z</published>
	<updated>2008-11-14T20:22:47Z</updated>
	<author>
		<name>Jaroslaw_Kowalski</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META content=&quot;text/html; charset=iso-8859-1&quot; http-equiv=Content-Type&gt;
&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18241&quot;&gt;

&lt;/HEAD&gt;
&lt;BODY bgColor=#ffffff&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;It's on my todo list for V2. I'm not sure to what 
extent this is possible, given how reflection-intensive NLog is but I'll give it 
a try.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;Jarek&lt;/FONT&gt;&lt;/DIV&gt;
&lt;BLOCKQUOTE style=&quot;BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px&quot;&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;----- Original Message ----- &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black&quot;&gt;&lt;B&gt;From:&lt;/B&gt; 
  &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20516836&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glenn_lanier@...&lt;/a&gt; &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;To:&lt;/B&gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20516836&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nlog-list@...&lt;/a&gt; 
  &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Sent:&lt;/B&gt; Friday, November 14, 2008 11:00 
  AM&lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Subject:&lt;/B&gt; [Nlog-list] NLog and ASP.NET / 
  Medium Trust&lt;/DIV&gt;
  &lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;Is there any way to run NLog in a medium trust environment (&lt;A href=&quot;http://ASP.NET&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ASP.NET&lt;/A&gt;)?&amp;nbsp;
  &lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
  &lt;DIV&gt;--G&lt;/DIV&gt;
  &lt;P&gt;
  &lt;HR&gt;

  &lt;P&gt;&lt;/P&gt;-------------------------------------------------------------------------&lt;BR&gt;This 
  SF.Net email is sponsored by the Moblin Your Move Developer's 
  challenge&lt;BR&gt;Build the coolest Linux based applications with Moblin SDK &amp;amp; 
  win great prizes&lt;BR&gt;Grand prize is a trip for two to an Open Source event 
  anywhere in the 
  world&lt;BR&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;amp;url=/
  &lt;P&gt;
  &lt;HR&gt;

  &lt;P&gt;&lt;/P&gt;_______________________________________________&lt;BR&gt;Nlog-list mailing 
  list&lt;BR&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20516836&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;&lt;BR&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;BR&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20516836&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-and-ASP.NET---Medium-Trust-tp20506532p20516836.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20516838</id>
	<title>New feature coming to NLog v2 - wrapper layout renderers</title>
	<published>2008-11-14T20:20:55Z</published>
	<updated>2008-11-14T20:20:55Z</updated>
	<author>
		<name>Jaroslaw_Kowalski</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META content=&quot;text/html; charset=iso-8859-1&quot; http-equiv=Content-Type&gt;
&lt;META name=GENERATOR content=&quot;MSHTML 8.00.6001.18241&quot;&gt;

&lt;/HEAD&gt;
&lt;BODY bgColor=#ffffff&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;With the code cleanup that's happening in NLog 
v2&amp;nbsp;branch I realized that I could easily add a cool feature: Wrapper Layout 
Renderers which would help me restructure code to make it more maintainable and 
testable.&amp;nbsp;I'd like to year your opinion about it.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;What are Wrapper Layout Renderers 
(WLRs)?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;Similar to wrapper targets, WLRs can modify output 
of other layout renderers, by doing textual transformations like:&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;* uppercase/lowercase conversion&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;* padding, trimming, alignment&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;* search/replace&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;*&amp;nbsp;elision of excessive text&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;* encryption / masking of sensitive 
information&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;*&amp;nbsp;cryptographic transformations (calculating 
MD5, SHA1 hashes, HMAC checksums)&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;* encoding: base64/uuencode, etc.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;etc.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;Note that many of those concerns are currently (in 
NLog&amp;nbsp;v1) handled by LayoutRenderer itself. Being able to separate them into 
standalone, extensible&amp;nbsp;classes is very convenient as you can add them 
separately and all existing layout renderers will be able to benefit from 
them.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;So how are they used:&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;${uppercase:${level}} - will print log level in 
uppercase&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;${rot13:${message}} -&amp;nbsp; will print ROT13 
&quot;encrypted&quot; message&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;For config-file-level compatibility, you will still 
be able to use uppercase,lowercase,padding attributes that you know from NLog v1 
directly on layout renderers etc. &lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;&lt;FONT color=#a31515 face=&quot;Courier New&quot;&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;To implement a wrapper, all you have to do is to 
create a class derived from WrapperLayoutRendererBase that overrides the 
Transform() method and apply the usual LayoutRenderer attribute.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2 face=Arial&gt;Here's the ROT13 wrapper, which implements Caesar's 
cipher.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size=2&gt;
&lt;P&gt;[&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;LayoutRenderer&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;&quot;rot13&quot;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)]&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;sealed&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 
&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;Rot13LayoutRendererWrapper&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;: &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;WrapperLayoutRendererBase&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
protected&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;override&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Transform(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; text)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
{&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; DecodeRot13(text);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;You can of course define public properties as be able 
to set their values as with regular layout renderers. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;I'm planning to add an additional concept called 
ambient properties which will help maintain NLog v1 compatibility while being 
very extensible. Ambient properties are properties that appear as if they were 
&lt;/FONT&gt;&lt;FONT size=2 face=Arial&gt;present on all layout renderers and when you 
actually use them, they add an implicit wrapper. This allows you to write: 
&lt;/FONT&gt;&lt;FONT size=2 face=Arial&gt;${level:uppercase=true:padding=-10} &lt;/FONT&gt;&lt;FONT size=2 face=Arial&gt;instead of: ${padding:padding=-10:&lt;/FONT&gt;&lt;FONT size=2 face=Arial&gt;${uppercase:${level}}}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face=Arial&gt;Whenever layout parser encounters an unknown property 
(such as &quot;uppercase&quot; which doesn't exist on LevelLayoutRenderer anymore) it will 
look for layout renderers which define [AmbientProperty(&quot;UpperCase&quot;)] and will 
instantiate them and use to wrap the original layout renderer:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2 face=Arial&gt;&lt;FONT size=2&gt;
&lt;P&gt;[&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;LayoutRenderer&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;&quot;uppercase&quot;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)]&lt;BR&gt;[&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;AmbientProperty&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;&quot;UpperCase&quot;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)]&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;sealed&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 
&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;UpperCaseLayoutRendererWrapper&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; : &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;WrapperLayoutRendererBase&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
private&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;bool&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; _upperCase = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;bool&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 
UpperCase&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
get&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; { &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; _upperCase; 
}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; { _upperCase = 
&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
protected&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;override&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; Transform(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; text)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; UpperCase ? 
text.ToUpperInvariant() : text;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I have some prototype code on my box and I will check in for others to play 
with as soon as I get this to a stable state.&lt;/P&gt;
&lt;P&gt;What do you think? &lt;/P&gt;
&lt;P&gt;Jarek&lt;/P&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20516838&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/New-feature-coming-to-NLog-v2---wrapper-layout-renderers-tp20516838p20516838.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20506532</id>
	<title>NLog and ASP.NET / Medium Trust</title>
	<published>2008-11-14T11:00:37Z</published>
	<updated>2008-11-14T11:00:37Z</updated>
	<author>
		<name>Glenn E. Lanier, II</name>
	</author>
	<content type="html">Is there any way to run NLog in a medium trust environment (&lt;a href=&quot;http://ASP.NET&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ASP.NET&lt;/a&gt;)?&amp;nbsp;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;--G&lt;/div&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20506532&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-and-ASP.NET---Medium-Trust-tp20506532p20506532.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20203893</id>
	<title>Forwarding adapters for log4net and System.Diagnostics</title>
	<published>2008-10-28T02:27:30Z</published>
	<updated>2008-10-28T02:27:30Z</updated>
	<author>
		<name>Steve Wagner</name>
	</author>
	<content type="html">Hi, a common question is, why so many people are using log4net instead
&lt;br&gt;of NLog. The most common answer is because the library's they use also
&lt;br&gt;using log4net, but they found the configuration of NLog a lot better.
&lt;br&gt;&lt;br&gt;So i suggest that NLog should provide forwarding appends for log4net and
&lt;br&gt;System.Diagnostics out of the box to make it easy to use NLog.
&lt;br&gt;&lt;br&gt;This should be as easy as possible, as example i can look like this:
&lt;br&gt;&lt;br&gt;log4net2NLogForwarder.Enabled = true;
&lt;br&gt;&lt;br&gt;Which will automatically setup log4net to forward all messages to NLog.
&lt;br&gt;&lt;br&gt;Steve
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20203893&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Forwarding-adapters-for-log4net-and-System.Diagnostics-tp20203893p20203893.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19995317</id>
	<title>Re: Programatic Configuration of targets and rules</title>
	<published>2008-10-15T07:53:52Z</published>
	<updated>2008-10-15T07:53:52Z</updated>
	<author>
		<name>Glenn E. Lanier, II</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;To follow up, I received an answer to this problem (didn&amp;#39;t pay attention to the mail headers -- reply was sent off-list).&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Essentially, I needed to create a new configuration (or get the current one), make my changes, then assign that configuration BACK to the LogManager.Configuration&lt;br&gt;
&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; &quot;&gt;&lt;div&gt;NLog.Config.LoggingConfiguration config =&amp;nbsp;new NLog.Config.LoggingConfiguration();&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;// Do all my stuff here&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; &quot;&gt;&lt;div&gt;config.AddTarget(targetDB.Name, targetDB);&lt;/div&gt;&lt;div&gt;config.LoggingRules.Add(new NLog.Config.LoggingRule(&amp;quot;*&amp;quot;, LogLevel.Trace, targetDB));&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;// Critical piece!&lt;/div&gt;&lt;div&gt;&lt;div&gt;LogManager.Configuration = config;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;--G&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Oct 7, 2008 at 10:44 AM, Glenn E. Lanier, II &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19995317&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glenn_lanier@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;&lt;div dir=&quot;ltr&quot;&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;div dir=&quot;ltr&quot;&gt;I&amp;#39;m trying to programatically configure a couple of targets and rules (hopefully so I won&amp;#39;t have to distribute an NLog.config file) for a WinForms application.&lt;div&gt;

&lt;br&gt;&lt;/div&gt;&lt;div&gt;First thing I did was ensure it would all work in the NLog.config file. Then, I tried to build the targets in code, removing the associated lines from the config file.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I have the following code (and I replaced the actual username/password/etc. with placeholder text):&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;// SQL Database&lt;/div&gt;&lt;div&gt;&lt;div&gt;NLog.Targets.DatabaseTarget targetDB = new NLog.Targets.DatabaseTarget();&lt;/div&gt;


&lt;div&gt;NLog.Targets.DatabaseParameterInfo paramDB;&lt;/div&gt;&lt;div&gt;targetDB.DBProvider = &amp;quot;mssql&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Name = &amp;quot;db&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.DBHost = &amp;quot;host&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.DBDatabase = &amp;quot;dbname&amp;quot;;&lt;/div&gt;


&lt;div&gt;targetDB.DBUserName = &amp;quot;username&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.DBPassword = &amp;quot;password&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.CommandText = &amp;quot;INSERT INTO Logs(LogTime, LogLevel, WindowsUserID, Logger, Message) VALUES (@LogTime, @LogLevel, @WindowsUserID, @Logger, @Message);&amp;quot;;&lt;/div&gt;


&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;paramDB = new NLog.Targets.DatabaseParameterInfo();&lt;/div&gt;&lt;div&gt;paramDB.Name = &amp;quot;@LogTime&amp;quot;;&lt;/div&gt;&lt;div&gt;paramDB.Layout = &amp;quot;${date}&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Parameters.Add(paramDB);&lt;/div&gt;&lt;div&gt;


&lt;br&gt;&lt;/div&gt;&lt;div&gt;paramDB = new NLog.Targets.DatabaseParameterInfo();&lt;/div&gt;&lt;div&gt;paramDB.Name = &amp;quot;@LogLevel&amp;quot;;&lt;/div&gt;&lt;div&gt;paramDB.Layout = &amp;quot;${level}&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Parameters.Add(paramDB);&lt;/div&gt;&lt;div&gt;&lt;br&gt;


&lt;/div&gt;&lt;div&gt;paramDB = new NLog.Targets.DatabaseParameterInfo();&lt;/div&gt;&lt;div&gt;paramDB.Name = &amp;quot;@WindowsUserID&amp;quot;;&lt;/div&gt;&lt;div&gt;paramDB.Layout = &amp;quot;${windows-identity:domain=false}&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Parameters.Add(paramDB);&lt;/div&gt;


&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;paramDB = new NLog.Targets.DatabaseParameterInfo();&lt;/div&gt;&lt;div&gt;paramDB.Name = &amp;quot;@Logger&amp;quot;;&lt;/div&gt;&lt;div&gt;paramDB.Layout = &amp;quot;${logger}&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Parameters.Add(paramDB);&lt;/div&gt;&lt;div&gt;


&lt;br&gt;&lt;/div&gt;&lt;div&gt;paramDB = new NLog.Targets.DatabaseParameterInfo();&lt;/div&gt;&lt;div&gt;paramDB.Name = &amp;quot;@Message&amp;quot;;&lt;/div&gt;&lt;div&gt;paramDB.Layout = &amp;quot;${message}&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Parameters.Add(paramDB);&lt;/div&gt;&lt;div&gt;&lt;br&gt;


&lt;/div&gt;&lt;div&gt;// General Log File&lt;/div&gt;&lt;div&gt;&lt;div&gt;NLog.Targets.FileTarget targetGenFile = new NLog.Targets.FileTarget();&lt;/div&gt;&lt;div&gt;targetGenFile.Name = &amp;quot;generalFile&amp;quot;;&lt;/div&gt;&lt;div&gt;targetGenFile.CreateDirs = true;&lt;/div&gt;


&lt;div&gt;targetGenFile.FileName = @&amp;quot;${basedir}\logs\${windows-identity:domain=false}\tb911.${date:format=yyyy.MM.dd}.log&amp;quot;;&lt;/div&gt;&lt;div&gt;targetGenFile.Layout = &amp;quot;${longdate}|${logger}|${level}|${message}&amp;quot;;&lt;/div&gt;


&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;// Console&lt;/div&gt;&lt;div&gt;&lt;div&gt;NLog.Targets.ConsoleTarget targetConsole = new NLog.Targets.ConsoleTarget();&lt;/div&gt;&lt;div&gt;targetConsole.Name = &amp;quot;console&amp;quot;;&lt;/div&gt;&lt;div&gt;targetConsole.Layout = &amp;quot;${longdate}|${logger}|${level}|${message}&amp;quot;;&lt;/div&gt;


&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;If I use the SimpleConfigurator:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;NLog.Config.SimpleConfigurator.ConfigureForTargetLogging(targetDB, LogLevel.Trace);&lt;/div&gt;&lt;div&gt;NLog.Config.SimpleConfigurator.ConfigureForTargetLogging(targetGenFile, LogLevel.Trace);&amp;nbsp;&lt;/div&gt;


&lt;div&gt;NLog.Config.SimpleConfigurator.ConfigureForTargetLogging(targetConsole, LogLevel.Trace);&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;it appears that the last item in the list is applied, but no others (i.e., this ordering allows the console messages to appear, but no file, and no DB. However, if I move targetDB to be the last command, console messages no longer appear, but DB messages are logged).&lt;/div&gt;


&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;So, I searched for a more in-depth article and found one that suggested:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;NLog.Config.LoggingConfiguration config = LogManager.Configuration;&lt;/div&gt;&lt;div&gt;if (null == config)&lt;/div&gt;


&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;config = new NLog.Config.LoggingConfiguration();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;config.AddTarget(targetDB.Name, targetDB);&lt;/div&gt;&lt;div&gt;config.LoggingRules.Add(new NLog.Config.LoggingRule(&amp;quot;*&amp;quot;, LogLevel.Trace, targetDB));&lt;/div&gt;


&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;config.AddTarget(targetGenFile.Name, targetGenFile);&lt;/div&gt;&lt;div&gt;config.LoggingRules.Add(new NLog.Config.LoggingRule(&amp;quot;*&amp;quot;, LogLevel.Trace, targetGenFile));&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;but I&amp;#39;m not have any success there, either.&lt;/div&gt;


&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Can anyone shed some light on how I can configure a SQL database target, a file target, and possibly a console target programatically?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks.&lt;/div&gt;&lt;div&gt;Glenn&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;


&lt;/div&gt;&lt;/div&gt;
&lt;br&gt;&lt;/div&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19995317&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glenn_lanier@...&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19995317&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Programatic-Configuration-of-targets-and-rules-tp19861103p19995317.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19861103</id>
	<title>Programatic Configuration of targets and rules</title>
	<published>2008-10-07T08:44:48Z</published>
	<updated>2008-10-07T08:44:48Z</updated>
	<author>
		<name>Glenn E. Lanier, II</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;div dir=&quot;ltr&quot;&gt;I&amp;#39;m trying to programatically configure a couple of targets and rules (hopefully so I won&amp;#39;t have to distribute an NLog.config file) for a WinForms application.&lt;div&gt;
&lt;br&gt;&lt;/div&gt;&lt;div&gt;First thing I did was ensure it would all work in the NLog.config file. Then, I tried to build the targets in code, removing the associated lines from the config file.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I have the following code (and I replaced the actual username/password/etc. with placeholder text):&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;// SQL Database&lt;/div&gt;&lt;div&gt;&lt;div&gt;NLog.Targets.DatabaseTarget targetDB = new NLog.Targets.DatabaseTarget();&lt;/div&gt;

&lt;div&gt;NLog.Targets.DatabaseParameterInfo paramDB;&lt;/div&gt;&lt;div&gt;targetDB.DBProvider = &amp;quot;mssql&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Name = &amp;quot;db&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.DBHost = &amp;quot;host&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.DBDatabase = &amp;quot;dbname&amp;quot;;&lt;/div&gt;

&lt;div&gt;targetDB.DBUserName = &amp;quot;username&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.DBPassword = &amp;quot;password&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.CommandText = &amp;quot;INSERT INTO Logs(LogTime, LogLevel, WindowsUserID, Logger, Message) VALUES (@LogTime, @LogLevel, @WindowsUserID, @Logger, @Message);&amp;quot;;&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;paramDB = new NLog.Targets.DatabaseParameterInfo();&lt;/div&gt;&lt;div&gt;paramDB.Name = &amp;quot;@LogTime&amp;quot;;&lt;/div&gt;&lt;div&gt;paramDB.Layout = &amp;quot;${date}&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Parameters.Add(paramDB);&lt;/div&gt;&lt;div&gt;

&lt;br&gt;&lt;/div&gt;&lt;div&gt;paramDB = new NLog.Targets.DatabaseParameterInfo();&lt;/div&gt;&lt;div&gt;paramDB.Name = &amp;quot;@LogLevel&amp;quot;;&lt;/div&gt;&lt;div&gt;paramDB.Layout = &amp;quot;${level}&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Parameters.Add(paramDB);&lt;/div&gt;&lt;div&gt;&lt;br&gt;

&lt;/div&gt;&lt;div&gt;paramDB = new NLog.Targets.DatabaseParameterInfo();&lt;/div&gt;&lt;div&gt;paramDB.Name = &amp;quot;@WindowsUserID&amp;quot;;&lt;/div&gt;&lt;div&gt;paramDB.Layout = &amp;quot;${windows-identity:domain=false}&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Parameters.Add(paramDB);&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;paramDB = new NLog.Targets.DatabaseParameterInfo();&lt;/div&gt;&lt;div&gt;paramDB.Name = &amp;quot;@Logger&amp;quot;;&lt;/div&gt;&lt;div&gt;paramDB.Layout = &amp;quot;${logger}&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Parameters.Add(paramDB);&lt;/div&gt;&lt;div&gt;

&lt;br&gt;&lt;/div&gt;&lt;div&gt;paramDB = new NLog.Targets.DatabaseParameterInfo();&lt;/div&gt;&lt;div&gt;paramDB.Name = &amp;quot;@Message&amp;quot;;&lt;/div&gt;&lt;div&gt;paramDB.Layout = &amp;quot;${message}&amp;quot;;&lt;/div&gt;&lt;div&gt;targetDB.Parameters.Add(paramDB);&lt;/div&gt;&lt;div&gt;&lt;br&gt;

&lt;/div&gt;&lt;div&gt;// General Log File&lt;/div&gt;&lt;div&gt;&lt;div&gt;NLog.Targets.FileTarget targetGenFile = new NLog.Targets.FileTarget();&lt;/div&gt;&lt;div&gt;targetGenFile.Name = &amp;quot;generalFile&amp;quot;;&lt;/div&gt;&lt;div&gt;targetGenFile.CreateDirs = true;&lt;/div&gt;

&lt;div&gt;targetGenFile.FileName = @&amp;quot;${basedir}\logs\${windows-identity:domain=false}\tb911.${date:format=yyyy.MM.dd}.log&amp;quot;;&lt;/div&gt;&lt;div&gt;targetGenFile.Layout = &amp;quot;${longdate}|${logger}|${level}|${message}&amp;quot;;&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;// Console&lt;/div&gt;&lt;div&gt;&lt;div&gt;NLog.Targets.ConsoleTarget targetConsole = new NLog.Targets.ConsoleTarget();&lt;/div&gt;&lt;div&gt;targetConsole.Name = &amp;quot;console&amp;quot;;&lt;/div&gt;&lt;div&gt;targetConsole.Layout = &amp;quot;${longdate}|${logger}|${level}|${message}&amp;quot;;&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;If I use the SimpleConfigurator:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;NLog.Config.SimpleConfigurator.ConfigureForTargetLogging(targetDB, LogLevel.Trace);&lt;/div&gt;&lt;div&gt;NLog.Config.SimpleConfigurator.ConfigureForTargetLogging(targetGenFile, LogLevel.Trace);&amp;nbsp;&lt;/div&gt;

&lt;div&gt;NLog.Config.SimpleConfigurator.ConfigureForTargetLogging(targetConsole, LogLevel.Trace);&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;it appears that the last item in the list is applied, but no others (i.e., this ordering allows the console messages to appear, but no file, and no DB. However, if I move targetDB to be the last command, console messages no longer appear, but DB messages are logged).&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;So, I searched for a more in-depth article and found one that suggested:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;NLog.Config.LoggingConfiguration config = LogManager.Configuration;&lt;/div&gt;&lt;div&gt;if (null == config)&lt;/div&gt;

&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;config = new NLog.Config.LoggingConfiguration();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;config.AddTarget(targetDB.Name, targetDB);&lt;/div&gt;&lt;div&gt;config.LoggingRules.Add(new NLog.Config.LoggingRule(&amp;quot;*&amp;quot;, LogLevel.Trace, targetDB));&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;config.AddTarget(targetGenFile.Name, targetGenFile);&lt;/div&gt;&lt;div&gt;config.LoggingRules.Add(new NLog.Config.LoggingRule(&amp;quot;*&amp;quot;, LogLevel.Trace, targetGenFile));&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;but I&amp;#39;m not have any success there, either.&lt;/div&gt;

&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Can anyone shed some light on how I can configure a SQL database target, a file target, and possibly a console target programatically?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks.&lt;/div&gt;&lt;div&gt;Glenn&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;/div&gt;&lt;/div&gt;
&lt;br&gt;&lt;/div&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19861103&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;glenn_lanier@...&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19861103&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Programatic-Configuration-of-targets-and-rules-tp19861103p19861103.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19430065</id>
	<title>Custom Layout Rendering</title>
	<published>2008-09-11T01:22:06Z</published>
	<updated>2008-09-11T01:22:06Z</updated>
	<author>
		<name>arvind Thakur</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;&lt;br clear=&quot;all&quot;&gt;&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;Hi,&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;I am in process of evaluating the NLog for our applications 
logging.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;After evaluating other logging tools, I find it most suitable&amp;nbsp;as 
per our&amp;nbsp;needs.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;However, I have a concern.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;Our need is to have the log file in the following 
format.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&amp;lt;FileName&amp;gt;:&amp;lt;LineNo&amp;gt;:&amp;lt;LoggerLevel&amp;gt;:&lt;strong&gt;&amp;nbsp;&amp;lt;Message&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/strong&gt;: &amp;lt;Date Time&amp;gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;Can the layout be rendered in the specific 
format?&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;The major issue over here is to have a fixed length for the message 
and if the message exceeds the size then the remaining message is displayed on 
the next line.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;For Example: If the message size is set to 10, and the message is 
&amp;quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&amp;quot; then the log file should have the output 
as&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&amp;lt;FileName&amp;gt;:&amp;lt;LineNo&amp;gt;:&amp;lt;LoggerLevel&amp;gt;: 
ABCDEFGHIJ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;:&amp;lt;Date 
Time&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&amp;lt;FileName&amp;gt;:&amp;lt;LineNo&amp;gt;:&amp;lt;LoggerLevel&amp;gt;: 
KLMNOPQRST&amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;lt;Date 
Time&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&amp;lt;FileName&amp;gt;:&amp;lt;LineNo&amp;gt;:&amp;lt;LoggerLevel&amp;gt;:&amp;nbsp;UVWXYZ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
:&amp;lt;Date 
Time&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;If we can log the 
messages in the aforementioned way, the log file is in more readable 
format.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;&lt;font color=&quot;#000080&quot; size=&quot;2&quot; face=&quot;Verdana&quot;&gt;I&amp;nbsp;would really appreciate 
if someone can guide me through. Sample code snippets would be&amp;nbsp;of great 
help.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 128); font-family: Verdana;&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;-- &lt;br&gt;With warm Regards,&lt;br&gt;Arvind Nath Thakur,&lt;br&gt;&lt;a href=&quot;http://www.linkedin.com/in/arvindthakur&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/arvindthakur&lt;/a&gt;&lt;br&gt;

&lt;/div&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19430065&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Custom-Layout-Rendering-tp19430065p19430065.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18783829</id>
	<title>Re: NLog refactoring / cleanup / directions ideas</title>
	<published>2008-08-01T15:49:48Z</published>
	<updated>2008-08-01T15:49:48Z</updated>
	<author>
		<name>Karl S</name>
	</author>
	<content type="html">I really like the direction of v2, especially the lamda evaluations. Very nice - how are things coming on getting a beta level release?
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Jaroslaw_Kowalski wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;I am thinking of serious cleanup of NLog code base and build process to make 
&lt;br&gt;entire product easier to maintain in the future. This will form a basis of 
&lt;br&gt;NLog 2.0:
&lt;br&gt;&lt;br&gt;Here are the directions I'm thinking about:
&lt;br&gt;&lt;br&gt;1. Replace NDoc(which is essentially dead) with Sandcastle 
&lt;br&gt;(&lt;a href=&quot;http://blogs.msdn.com/sandcastle/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blogs.msdn.com/sandcastle/&lt;/a&gt;) for documentation generation.
&lt;br&gt;&lt;br&gt;2. Deprecate/Remove suppport .NET 1.x and .NET Compact Framework 1.x (NLog 
&lt;br&gt;1.0 will stay around to support older frameworks, I don't want legacy code 
&lt;br&gt;to remain there in NLog 2.0).
&lt;br&gt;&lt;br&gt;3. No more &amp;quot;universal&amp;quot; release (which was built with .NET 1.0 and used many 
&lt;br&gt;runtime tricks to detect and compensate for platform differences). Instead 
&lt;br&gt;targeted builds will be available for all frameworks.
&lt;br&gt;&lt;br&gt;4. Add generics to Logger (replace generated code with generic methods) - 
&lt;br&gt;will maintain source-level compatibility but will break IL-level 
&lt;br&gt;compatibility.
&lt;br&gt;&lt;br&gt;5. Move to a single build system (MSBuild). Remove NAnt, VS2003 and compact 
&lt;br&gt;framework projects. Some simple msbuild hackery will be used to produce 
&lt;br&gt;builds for all supported platforms.
&lt;br&gt;&lt;br&gt;6. Evaluate the possibility of using LINQ-style lambdas to do deferred 
&lt;br&gt;evaluation of layouts and/or log messages, something like:
&lt;br&gt;&lt;br&gt;for (int i = 0; i &amp;lt; 10; ++i)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; logger.Debug(()=&amp;gt; &amp;quot;asdasd&amp;quot; + i); &amp;nbsp; &amp;nbsp; // lambda here will not be 
&lt;br&gt;evaluated if logging is disabled for Debug level.
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Rationale: Many people still try to use string concatenation (which kills 
&lt;br&gt;performance) instead of String.Format-style when passing log messages. 
&lt;br&gt;Lambdas have the potential to make that easier while maitaining high speed.
&lt;br&gt;&lt;br&gt;7. Simplify website/documentation generation. Sandcastle may help here.
&lt;br&gt;&lt;br&gt;I would like to hear your comments - do you think the above list is 
&lt;br&gt;reasonable? What directions would you like NLog 2.x to evolve in?
&lt;br&gt;&lt;br&gt;Jarek 
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;Nlog-list@lists.sourceforge.net
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-refactoring---cleanup---directions-ideas-tp17660984p18783829.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18537560</id>
	<title>Re: Initial NLog v2 checkin (was Re: NLog refactoring / cleanup / directions ideas)</title>
	<published>2008-07-18T13:56:02Z</published>
	<updated>2008-07-18T13:56:02Z</updated>
	<author>
		<name>ifwdev</name>
	</author>
	<content type="html">I have just started using NLog and I think these changes are great! &amp;nbsp;Thank you for producing such a high quality project!</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-refactoring---cleanup---directions-ideas-tp17660984p18537560.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18051767</id>
	<title>Initial NLog v2 checkin (was Re: NLog refactoring / cleanup / directions ideas)</title>
	<published>2008-06-21T23:24:41Z</published>
	<updated>2008-06-21T23:24:41Z</updated>
	<author>
		<name>Jaroslaw_Kowalski</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;I've just created a new NLog2 branch and checked in first, very experimental 
&lt;br&gt;but pretty big refactoring and cleanup.
&lt;br&gt;&lt;br&gt;The code is at &lt;a href=&quot;http://svn.nlog-project.org/repos/nlog/branches/NLog2/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://svn.nlog-project.org/repos/nlog/branches/NLog2/&lt;/a&gt;&lt;br&gt;The change can be viewer: 
&lt;br&gt;&lt;a href=&quot;http://svn.nlog-project.org/viewvc/viewvc.cgi?view=rev&amp;revision=511&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://svn.nlog-project.org/viewvc/viewvc.cgi?view=rev&amp;revision=511&lt;/a&gt;&lt;br&gt;&lt;br&gt;There are several breaking changes in the API (although compensating for 
&lt;br&gt;them should be as simple as changing several using statements and using 
&lt;br&gt;generics instead of untyped collections in most cases).
&lt;br&gt;Configuration file format and option have remained unchanged (and I have no 
&lt;br&gt;plans to touch this area). As a result upgrading from NLog v1 should be 
&lt;br&gt;pretty smooth for users who are not using configuration API.
&lt;br&gt;Logging API should remain source-level compatible, but not IL-compatible. 
&lt;br&gt;There is one minor addition to allow lambdas to be specified to produce 
&lt;br&gt;deferred logging messages.
&lt;br&gt;&lt;br&gt;Code base has been reduced by 12% (down from 3879K to 3417K), mostly thanks 
&lt;br&gt;to using generics and other .NET 2.0 features which helper remove certain 
&lt;br&gt;pieces of generated code.
&lt;br&gt;We are now at revision 0x200 - seems like a good start for V2?
&lt;br&gt;&lt;br&gt;Please let me know what you think.
&lt;br&gt;&lt;br&gt;Jarek
&lt;br&gt;&lt;br&gt;Checkin comment:
&lt;br&gt;&lt;br&gt;* configuration-file-based usage remains unchanged
&lt;br&gt;* API refactored in many ways (some breaking changes)
&lt;br&gt;&amp;nbsp; &amp;nbsp; * moved certain classes from NLog namespace to NLog.Config, 
&lt;br&gt;NLog.Targets, NLog.Layouts, NLog.LayoutRenderers
&lt;br&gt;&amp;nbsp; &amp;nbsp; * renamed Layout to SimpleLayout
&lt;br&gt;&amp;nbsp; &amp;nbsp; * turned ILayout interface into Layout base class
&lt;br&gt;&amp;nbsp; &amp;nbsp; * removed CompiledLayout pattern all over the place
&lt;br&gt;&amp;nbsp; &amp;nbsp; * removed [AcceptsLayout] by replacing all string properties with actual 
&lt;br&gt;Layouts (added implicit conversion from string makes the usage clean)
&lt;br&gt;&amp;nbsp; &amp;nbsp; * removed [AcceptsCondition] by replacing all string properties with 
&lt;br&gt;ConditionExpression (added implicit conversion from string makes the usage 
&lt;br&gt;clean)
&lt;br&gt;&amp;nbsp; &amp;nbsp; * removed most of platform detection logic (will use conditional 
&lt;br&gt;compilation exclusively in v2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; * removed NLog.*Factory classes and aggregated all factories 
&lt;br&gt;NLog.Config.NLogFactories using common interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; * removed *Collection and *Dictionary classes and replaced them with 
&lt;br&gt;generics
&lt;br&gt;&amp;nbsp; &amp;nbsp; * public APIs that used to expose *Collection are now ICollection&amp;lt;T&amp;gt; or 
&lt;br&gt;IList&amp;lt;T&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; * refactored LogEventInfo into multiple classes for formatted and 
&lt;br&gt;unformatted events
&lt;br&gt;&amp;nbsp; &amp;nbsp; * added delayed evaluation delegate (LogMessageDelegate) and added 
&lt;br&gt;logging method overloads that accept it:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Usage (C# 3.0 using lambda syntax):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logger.Info(() =&amp;gt; &amp;quot;this is my message, x=&amp;quot; + x + &amp;quot;, y=&amp;quot; + y);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Usage (C# 2.0 using inline delegate syntax)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logger.Info(delegate { return &amp;quot;this is my message, x=&amp;quot; + x + &amp;quot;, 
&lt;br&gt;y=&amp;quot; + y });
&lt;br&gt;&amp;nbsp; &amp;nbsp; * removed VS 2003 project files
&lt;br&gt;&amp;nbsp; &amp;nbsp; * regenerated Logger.cs to use generics
&lt;br&gt;* removed support for .NET 1.x and .NET CF 1.x and many hacks and 
&lt;br&gt;workarounds to support them
&lt;br&gt;&lt;br&gt;This is intermediate and somewhat experimental check-in in a separate 
&lt;br&gt;branch, some things are broken:
&lt;br&gt;&amp;nbsp; &amp;nbsp; * Documentation generation with NDoc is broken at this point - will be 
&lt;br&gt;replaced with Sandcastle
&lt;br&gt;&amp;nbsp; &amp;nbsp; * NAnt scripts are currently broken (use MSBuild 3.5). NAnt support will 
&lt;br&gt;most like be completely removed for V2
&lt;br&gt;&lt;br&gt;All unit tests are passing (using NUnit 2.4.7).
&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: &amp;quot;Steve Wagner&amp;quot; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18051767&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lists@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18051767&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nlog-list@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Thursday, June 05, 2008 3:58 AM
&lt;br&gt;Subject: Re: [Nlog-list] NLog refactoring / cleanup / directions ideas
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hallo Jaroslaw,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; first i have a suggestion. Currently there is a forum and a
&lt;br&gt;&amp;gt; Mailing-list. I for myself prefer Mailing lists instead of Forums
&lt;br&gt;&amp;gt; because i can read the messages in the style i like and not the style
&lt;br&gt;&amp;gt; the forum administrator prefer :-) So i suggest to go the mono way
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://go-mono.com/forums/#nabble-f1367&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://go-mono.com/forums/#nabble-f1367&lt;/a&gt;&amp;nbsp;and integrate the Mailing list
&lt;br&gt;&amp;gt; as Forum on the page. So there is only on source to communicate but two
&lt;br&gt;&amp;gt; way to do it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Possibly it is also a good advice to move the project and homepage to
&lt;br&gt;&amp;gt; CodePlex and leave only the Mailinglist and Sourcecode on SF.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I also think this are all good ideas and hope to see this nice lib go
&lt;br&gt;&amp;gt; forward.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Steve
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Jaroslaw Kowalski schrieb:
&lt;br&gt;&amp;gt;&amp;gt; I am thinking of serious cleanup of NLog code base and build process to 
&lt;br&gt;&amp;gt;&amp;gt; make
&lt;br&gt;&amp;gt;&amp;gt; entire product easier to maintain in the future. This will form a basis 
&lt;br&gt;&amp;gt;&amp;gt; of
&lt;br&gt;&amp;gt;&amp;gt; NLog 2.0:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Here are the directions I'm thinking about:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 1. Replace NDoc(which is essentially dead) with Sandcastle
&lt;br&gt;&amp;gt;&amp;gt; (&lt;a href=&quot;http://blogs.msdn.com/sandcastle/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blogs.msdn.com/sandcastle/&lt;/a&gt;) for documentation generation.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 2. Deprecate/Remove suppport .NET 1.x and .NET Compact Framework 1.x 
&lt;br&gt;&amp;gt;&amp;gt; (NLog
&lt;br&gt;&amp;gt;&amp;gt; 1.0 will stay around to support older frameworks, I don't want legacy 
&lt;br&gt;&amp;gt;&amp;gt; code
&lt;br&gt;&amp;gt;&amp;gt; to remain there in NLog 2.0).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 3. No more &amp;quot;universal&amp;quot; release (which was built with .NET 1.0 and used 
&lt;br&gt;&amp;gt;&amp;gt; many
&lt;br&gt;&amp;gt;&amp;gt; runtime tricks to detect and compensate for platform differences). 
&lt;br&gt;&amp;gt;&amp;gt; Instead
&lt;br&gt;&amp;gt;&amp;gt; targeted builds will be available for all frameworks.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 4. Add generics to Logger (replace generated code with generic methods) -
&lt;br&gt;&amp;gt;&amp;gt; will maintain source-level compatibility but will break IL-level
&lt;br&gt;&amp;gt;&amp;gt; compatibility.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 5. Move to a single build system (MSBuild). Remove NAnt, VS2003 and 
&lt;br&gt;&amp;gt;&amp;gt; compact
&lt;br&gt;&amp;gt;&amp;gt; framework projects. Some simple msbuild hackery will be used to produce
&lt;br&gt;&amp;gt;&amp;gt; builds for all supported platforms.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 6. Evaluate the possibility of using LINQ-style lambdas to do deferred
&lt;br&gt;&amp;gt;&amp;gt; evaluation of layouts and/or log messages, something like:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; for (int i = 0; i &amp;lt; 10; ++i)
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; logger.Debug(()=&amp;gt; &amp;quot;asdasd&amp;quot; + i); &amp;nbsp; &amp;nbsp; // lambda here will not be
&lt;br&gt;&amp;gt;&amp;gt; evaluated if logging is disabled for Debug level.
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Rationale: Many people still try to use string concatenation (which kills
&lt;br&gt;&amp;gt;&amp;gt; performance) instead of String.Format-style when passing log messages.
&lt;br&gt;&amp;gt;&amp;gt; Lambdas have the potential to make that easier while maitaining high 
&lt;br&gt;&amp;gt;&amp;gt; speed.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 7. Simplify website/documentation generation. Sandcastle may help here.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I would like to hear your comments - do you think the above list is
&lt;br&gt;&amp;gt;&amp;gt; reasonable? What directions would you like NLog 2.x to evolve in?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Check out the new SourceForge.net Marketplace.
&lt;br&gt;&amp;gt; It's the best place to buy or sell services for
&lt;br&gt;&amp;gt; just about anything Open Source.
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Nlog-list mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18051767&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18051767&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-refactoring---cleanup---directions-ideas-tp17660984p18051767.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17865994</id>
	<title>Re: Performance Enhancements</title>
	<published>2008-06-16T07:38:36Z</published>
	<updated>2008-06-16T07:38:36Z</updated>
	<author>
		<name>Jake Milnes</name>
	</author>
	<content type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div style=&quot;font-family:times new roman, new york, times, serif;font-size:12pt&quot;&gt;&lt;div style=&quot;font-family: times new roman,new york,times,serif; font-size: 12pt;&quot;&gt;Hello,&lt;br&gt;&lt;br&gt;For those interested, here is the patch for the below mentioned items.&lt;br&gt;&lt;br&gt;NLog-1.0\src\NLog\Targets\Wrappers\AsyncTargetWrapper.cs&lt;br&gt;208c208&lt;br&gt;&amp;lt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } while (_flushAll);&lt;br&gt;---&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } while (_flushAll || RequestQueue.RequestCount &amp;gt; BatchSize);&lt;br&gt;&lt;br&gt;NLog-1.0\src\NLog\Win32\Targets\MSMQ.cs&lt;br&gt;189a190,224&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// Writes the specified array of logging events to a queue specified in the Queue
 &lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// parameter.&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;logEvents&quot;&amp;gt;An array of &amp;lt;see cref=&quot;LogEventInfo &quot;/&amp;gt; objects.&amp;lt;/param&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;remarks&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// This function override increases performance of batches by not having to&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// check the queues existence and connect to it for each logEvent.&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;/remarks&amp;gt;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected internal override void Write(LogEventInfo[] logEvents)&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
 {&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (_queue == null)&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!MessageQueue.Exists(Queue))&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (CreateQueueIfNotExists)&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageQueue.Create(Queue);&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
 return;&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (MessageQueue mq = new MessageQueue(Queue))&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (LogEventInfo logEvent in logEvents)&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Message msg = PrepareMessage(logEvent);&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (msg !=
 null)&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mq.Send(msg);&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;summary&amp;gt;&lt;/div&gt;&lt;br&gt;Thanks,&lt;br&gt;&lt;br&gt;Jake Milnes&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div style=&quot;font-family: times new roman,new york,times,serif; font-size: 12pt;&quot;&gt;----- Original Message ----&lt;br&gt;From: Jake Milnes
 &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17865994&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jacob_milnes@...&lt;/a&gt;&amp;gt;&lt;br&gt;To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17865994&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nlog-list@...&lt;/a&gt;&lt;br&gt;Sent: Tuesday, June 3, 2008 10:24:25 AM&lt;br&gt;Subject: Performance Enhancements&lt;br&gt;&lt;br&gt;&lt;div style=&quot;font-family: times new roman,new york,times,serif; font-size: 12pt;&quot;&gt;&lt;div&gt;Hello,&lt;br&gt;&lt;br&gt;For a new project of ours, we looked at several different logging frameworks and decided on using NLog.&amp;nbsp; Thanks for making NLog great!&lt;br&gt;&lt;br&gt;We made a couple of minor performance enhancements to speed up our particular usage of NLog.&amp;nbsp; I would like to find out&amp;nbsp; if others are interested in these performance enhancements or if anyone sees any problems with these:&lt;br&gt;&lt;br&gt;1.&amp;nbsp; Added Write(LogEvent[]) override to the MSMQ class.&amp;nbsp; This removes the overhead of checking for the queue's existence, connecting and disconnecting for every insert if you are batching the inserts (e.g. through a buffered wrapper or async wrapper).&lt;br&gt;2.&amp;nbsp; Updated the Async wrapper class so that it doesn't
 go back to sleep after processing a callback if there are still enough items
 on the queue for a full batch.&lt;br&gt;&lt;br&gt;We did some decent performance testing benchmarks before and after, and saw significant gains in the applicable test cases (by roughly a factor of 5).&amp;nbsp; I can provide more detail on the performance test if someone is truly interested (the test results currently are not written up for release).&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;&lt;br&gt;Jake Milnes&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17865994&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Re%3A-Performance-Enhancements-tp17865994p17865994.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17685581</id>
	<title>Re: NLog refactoring / cleanup / directions ideas</title>
	<published>2008-06-05T23:39:13Z</published>
	<updated>2008-06-05T23:39:13Z</updated>
	<author>
		<name>KlaWill</name>
	</author>
	<content type="html">Hello Jaroslaw, Hello all others who reading this
&lt;br&gt;&lt;br&gt;First of all; Nlog is great and works very well
&lt;br&gt;Thanks Jaruslav!!
&lt;br&gt;&lt;br&gt;The only enemy of a good thing is a better thing.
&lt;br&gt;Therefore i have a few suggestions:
&lt;br&gt;&lt;br&gt;is it possible to make nlogviewer more complete ?
&lt;br&gt;(Have a look at tracetool. realy great for tracing, not so for logging)
&lt;br&gt;- logging complete objects 
&lt;br&gt;&lt;br&gt;The rest is said before, nothing to comment.
&lt;br&gt;For me it seem that all Ideas are making sens.
&lt;br&gt;&lt;br&gt;Best wishes
&lt;br&gt;Klaus</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-refactoring---cleanup---directions-ideas-tp17660984p17685581.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17667271</id>
	<title>Re: NLog refactoring / cleanup / directions ideas</title>
	<published>2008-06-05T03:58:56Z</published>
	<updated>2008-06-05T03:58:56Z</updated>
	<author>
		<name>Steve Wagner</name>
	</author>
	<content type="html">Hallo Jaroslaw,
&lt;br&gt;&lt;br&gt;first i have a suggestion. Currently there is a forum and a 
&lt;br&gt;Mailing-list. I for myself prefer Mailing lists instead of Forums 
&lt;br&gt;because i can read the messages in the style i like and not the style 
&lt;br&gt;the forum administrator prefer :-) So i suggest to go the mono way 
&lt;br&gt;&lt;a href=&quot;http://go-mono.com/forums/#nabble-f1367&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://go-mono.com/forums/#nabble-f1367&lt;/a&gt;&amp;nbsp;and integrate the Mailing list 
&lt;br&gt;as Forum on the page. So there is only on source to communicate but two 
&lt;br&gt;way to do it.
&lt;br&gt;&lt;br&gt;Possibly it is also a good advice to move the project and homepage to 
&lt;br&gt;CodePlex and leave only the Mailinglist and Sourcecode on SF.
&lt;br&gt;&lt;br&gt;I also think this are all good ideas and hope to see this nice lib go 
&lt;br&gt;forward.
&lt;br&gt;&lt;br&gt;Steve
&lt;br&gt;&lt;br&gt;Jaroslaw Kowalski schrieb:
&lt;br&gt;&amp;gt; I am thinking of serious cleanup of NLog code base and build process to make 
&lt;br&gt;&amp;gt; entire product easier to maintain in the future. This will form a basis of 
&lt;br&gt;&amp;gt; NLog 2.0:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Here are the directions I'm thinking about:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1. Replace NDoc(which is essentially dead) with Sandcastle 
&lt;br&gt;&amp;gt; (&lt;a href=&quot;http://blogs.msdn.com/sandcastle/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blogs.msdn.com/sandcastle/&lt;/a&gt;) for documentation generation.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 2. Deprecate/Remove suppport .NET 1.x and .NET Compact Framework 1.x (NLog 
&lt;br&gt;&amp;gt; 1.0 will stay around to support older frameworks, I don't want legacy code 
&lt;br&gt;&amp;gt; to remain there in NLog 2.0).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 3. No more &amp;quot;universal&amp;quot; release (which was built with .NET 1.0 and used many 
&lt;br&gt;&amp;gt; runtime tricks to detect and compensate for platform differences). Instead 
&lt;br&gt;&amp;gt; targeted builds will be available for all frameworks.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 4. Add generics to Logger (replace generated code with generic methods) - 
&lt;br&gt;&amp;gt; will maintain source-level compatibility but will break IL-level 
&lt;br&gt;&amp;gt; compatibility.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 5. Move to a single build system (MSBuild). Remove NAnt, VS2003 and compact 
&lt;br&gt;&amp;gt; framework projects. Some simple msbuild hackery will be used to produce 
&lt;br&gt;&amp;gt; builds for all supported platforms.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 6. Evaluate the possibility of using LINQ-style lambdas to do deferred 
&lt;br&gt;&amp;gt; evaluation of layouts and/or log messages, something like:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; for (int i = 0; i &amp;lt; 10; ++i)
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; logger.Debug(()=&amp;gt; &amp;quot;asdasd&amp;quot; + i); &amp;nbsp; &amp;nbsp; // lambda here will not be 
&lt;br&gt;&amp;gt; evaluated if logging is disabled for Debug level.
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Rationale: Many people still try to use string concatenation (which kills 
&lt;br&gt;&amp;gt; performance) instead of String.Format-style when passing log messages. 
&lt;br&gt;&amp;gt; Lambdas have the potential to make that easier while maitaining high speed.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 7. Simplify website/documentation generation. Sandcastle may help here.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I would like to hear your comments - do you think the above list is 
&lt;br&gt;&amp;gt; reasonable? What directions would you like NLog 2.x to evolve in?
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17667271&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-refactoring---cleanup---directions-ideas-tp17660984p17667271.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17667208</id>
	<title>Re: NLog refactoring / cleanup / directions ideas</title>
	<published>2008-06-05T03:54:59Z</published>
	<updated>2008-06-05T03:54:59Z</updated>
	<author>
		<name>mattman206</name>
	</author>
	<content type="html">I think that all of these items are excellent ideas.&amp;nbsp; NLog is a great library and I&amp;#39;d hate to see it fade out of popularity because it hasn&amp;#39;t kept up.&amp;nbsp; Sure it hasn&amp;#39;t had any updates for the last year, but that&amp;#39;s because it didn&amp;#39;t need any.&amp;nbsp; The performance increases would be nice too.&lt;br&gt;
&lt;br&gt;Can we also get a VS2008 solution? :)&amp;nbsp; (Small thing, I know)&lt;br&gt;&lt;br&gt;I&amp;#39;m not sure if DocProject is quite ready for production use, but that might be something to look into.&lt;br&gt;&lt;a href=&quot;http://www.codeplex.com/DocProject&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.codeplex.com/DocProject&lt;/a&gt;&lt;br&gt;
&lt;br&gt;Irregardless of DocProject, the Sandcastle Help File Builder will be useful as it tries to duplicate the NDoc GUI.&lt;br&gt;&lt;a href=&quot;http://www.codeplex.com/SHFB&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.codeplex.com/SHFB&lt;/a&gt;&lt;br&gt;&lt;br&gt;I&amp;#39;ve done some similar changes on other projects and would love to help out with this.&amp;nbsp; Let me know :)&lt;br&gt;
&lt;br&gt;-Matt&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Jun 4, 2008 at 10:52 PM, Jaroslaw Kowalski &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17667208&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jaak@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
I am thinking of serious cleanup of NLog code base and build process to make&lt;br&gt;
entire product easier to maintain in the future. This will form a basis of&lt;br&gt;
NLog 2.0:&lt;br&gt;
&lt;br&gt;
Here are the directions I&amp;#39;m thinking about:&lt;br&gt;
&lt;br&gt;
1. Replace NDoc(which is essentially dead) with Sandcastle&lt;br&gt;
(&lt;a href=&quot;http://blogs.msdn.com/sandcastle/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://blogs.msdn.com/sandcastle/&lt;/a&gt;) for documentation generation.&lt;br&gt;
&lt;br&gt;
2. Deprecate/Remove suppport .NET 1.x and .NET Compact Framework 1.x (NLog&lt;br&gt;
1.0 will stay around to support older frameworks, I don&amp;#39;t want legacy code&lt;br&gt;
to remain there in NLog 2.0).&lt;br&gt;
&lt;br&gt;
3. No more &amp;quot;universal&amp;quot; release (which was built with .NET 1.0 and used many&lt;br&gt;
runtime tricks to detect and compensate for platform differences). Instead&lt;br&gt;
targeted builds will be available for all frameworks.&lt;br&gt;
&lt;br&gt;
4. Add generics to Logger (replace generated code with generic methods) -&lt;br&gt;
will maintain source-level compatibility but will break IL-level&lt;br&gt;
compatibility.&lt;br&gt;
&lt;br&gt;
5. Move to a single build system (MSBuild). Remove NAnt, VS2003 and compact&lt;br&gt;
framework projects. Some simple msbuild hackery will be used to produce&lt;br&gt;
builds for all supported platforms.&lt;br&gt;
&lt;br&gt;
6. Evaluate the possibility of using LINQ-style lambdas to do deferred&lt;br&gt;
evaluation of layouts and/or log messages, something like:&lt;br&gt;
&lt;br&gt;
for (int i = 0; i &amp;lt; 10; ++i)&lt;br&gt;
{&lt;br&gt;
 &amp;nbsp; &amp;nbsp;logger.Debug(()=&amp;gt; &amp;quot;asdasd&amp;quot; + i); &amp;nbsp; &amp;nbsp; // lambda here will not be&lt;br&gt;
evaluated if logging is disabled for Debug level.&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
Rationale: Many people still try to use string concatenation (which kills&lt;br&gt;
performance) instead of String.Format-style when passing log messages.&lt;br&gt;
Lambdas have the potential to make that easier while maitaining high speed.&lt;br&gt;
&lt;br&gt;
7. Simplify website/documentation generation. Sandcastle may help here.&lt;br&gt;
&lt;br&gt;
I would like to hear your comments - do you think the above list is&lt;br&gt;
reasonable? What directions would you like NLog 2.x to evolve in?&lt;br&gt;
&lt;br&gt;
Jarek&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
-------------------------------------------------------------------------&lt;br&gt;
Check out the new SourceForge.net Marketplace.&lt;br&gt;
It&amp;#39;s the best place to buy or sell services for&lt;br&gt;
just about anything Open Source.&lt;br&gt;
&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Nlog-list mailing list&lt;br&gt;
&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17667208&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17667208&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-refactoring---cleanup---directions-ideas-tp17660984p17667208.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17660984</id>
	<title>NLog refactoring / cleanup / directions ideas</title>
	<published>2008-06-04T19:52:10Z</published>
	<updated>2008-06-04T19:52:10Z</updated>
	<author>
		<name>Jaroslaw_Kowalski</name>
	</author>
	<content type="html">I am thinking of serious cleanup of NLog code base and build process to make 
&lt;br&gt;entire product easier to maintain in the future. This will form a basis of 
&lt;br&gt;NLog 2.0:
&lt;br&gt;&lt;br&gt;Here are the directions I'm thinking about:
&lt;br&gt;&lt;br&gt;1. Replace NDoc(which is essentially dead) with Sandcastle 
&lt;br&gt;(&lt;a href=&quot;http://blogs.msdn.com/sandcastle/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blogs.msdn.com/sandcastle/&lt;/a&gt;) for documentation generation.
&lt;br&gt;&lt;br&gt;2. Deprecate/Remove suppport .NET 1.x and .NET Compact Framework 1.x (NLog 
&lt;br&gt;1.0 will stay around to support older frameworks, I don't want legacy code 
&lt;br&gt;to remain there in NLog 2.0).
&lt;br&gt;&lt;br&gt;3. No more &amp;quot;universal&amp;quot; release (which was built with .NET 1.0 and used many 
&lt;br&gt;runtime tricks to detect and compensate for platform differences). Instead 
&lt;br&gt;targeted builds will be available for all frameworks.
&lt;br&gt;&lt;br&gt;4. Add generics to Logger (replace generated code with generic methods) - 
&lt;br&gt;will maintain source-level compatibility but will break IL-level 
&lt;br&gt;compatibility.
&lt;br&gt;&lt;br&gt;5. Move to a single build system (MSBuild). Remove NAnt, VS2003 and compact 
&lt;br&gt;framework projects. Some simple msbuild hackery will be used to produce 
&lt;br&gt;builds for all supported platforms.
&lt;br&gt;&lt;br&gt;6. Evaluate the possibility of using LINQ-style lambdas to do deferred 
&lt;br&gt;evaluation of layouts and/or log messages, something like:
&lt;br&gt;&lt;br&gt;for (int i = 0; i &amp;lt; 10; ++i)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; logger.Debug(()=&amp;gt; &amp;quot;asdasd&amp;quot; + i); &amp;nbsp; &amp;nbsp; // lambda here will not be 
&lt;br&gt;evaluated if logging is disabled for Debug level.
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Rationale: Many people still try to use string concatenation (which kills 
&lt;br&gt;performance) instead of String.Format-style when passing log messages. 
&lt;br&gt;Lambdas have the potential to make that easier while maitaining high speed.
&lt;br&gt;&lt;br&gt;7. Simplify website/documentation generation. Sandcastle may help here.
&lt;br&gt;&lt;br&gt;I would like to hear your comments - do you think the above list is 
&lt;br&gt;reasonable? What directions would you like NLog 2.x to evolve in?
&lt;br&gt;&lt;br&gt;Jarek 
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17660984&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/NLog-refactoring---cleanup---directions-ideas-tp17660984p17660984.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17638716</id>
	<title>Re: Performance Enhancements</title>
	<published>2008-06-03T21:01:06Z</published>
	<updated>2008-06-03T21:01:06Z</updated>
	<author>
		<name>Jaroslaw_Kowalski</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; For a new project of ours, we looked at several different logging
&lt;br&gt;&amp;gt; frameworks and decided on using NLog. &amp;nbsp;Thanks for making NLog great!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; We made a couple of minor performance enhancements to speed up our
&lt;br&gt;&amp;gt; particular usage of NLog. &amp;nbsp;I would like to find out &amp;nbsp;if others are
&lt;br&gt;&amp;gt; interested in these performance enhancements or if anyone sees any
&lt;br&gt;&amp;gt; problems with these:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1. &amp;nbsp;Added Write(LogEvent[]) override to the MSMQ class. &amp;nbsp;This removes the
&lt;br&gt;&amp;gt; overhead of checking for the queue's existence, connecting and
&lt;br&gt;&amp;gt; disconnecting for every insert if you are batching the inserts (e.g.
&lt;br&gt;&amp;gt; through a buffered wrapper or async wrapper).
&lt;br&gt;&amp;gt; 2. &amp;nbsp;Updated the Async wrapper class so that it doesn't go back to sleep
&lt;br&gt;&amp;gt; after processing a callback if there are still enough items on the queue
&lt;br&gt;&amp;gt; for a full batch.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; We did some decent performance testing benchmarks before and after, and
&lt;br&gt;&amp;gt; saw significant gains in the applicable test cases (by roughly a factor of
&lt;br&gt;&amp;gt; 5). &amp;nbsp;I can provide more detail on the performance test if someone is truly
&lt;br&gt;&amp;gt; interested (the test results currently are not written up for release).
&lt;/div&gt;&lt;br&gt;That sounds like a nice addition to NLog. Can you send a patch so that
&lt;br&gt;people on the list can review it? I'll be happy to include it in the
&lt;br&gt;source.
&lt;br&gt;&lt;br&gt;Jarek
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;Check out the new SourceForge.net Marketplace.
&lt;br&gt;It's the best place to buy or sell services for
&lt;br&gt;just about anything Open Source.
&lt;br&gt;&lt;a href=&quot;http://sourceforge.net/services/buy/index.php&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/services/buy/index.php&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17638716&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Performance-Enhancements-tp17628959p17638716.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17628959</id>
	<title>Performance Enhancements</title>
	<published>2008-06-03T10:24:25Z</published>
	<updated>2008-06-03T10:24:25Z</updated>
	<author>
		<name>Jake Milnes</name>
	</author>
	<content type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;div style=&quot;font-family:times new roman, new york, times, serif;font-size:12pt&quot;&gt;&lt;div&gt;Hello,&lt;br&gt;&lt;br&gt;For a new project of ours, we looked at several different logging frameworks and decided on using NLog.&amp;nbsp; Thanks for making NLog great!&lt;br&gt;&lt;br&gt;We made a couple of minor performance enhancements to speed up our particular usage of NLog.&amp;nbsp; I would like to find out&amp;nbsp; if others are interested in these performance enhancements or if anyone sees any problems with these:&lt;br&gt;&lt;br&gt;1.&amp;nbsp; Added Write(LogEvent[]) override to the MSMQ class.&amp;nbsp; This removes the overhead of checking for the queue's existence, connecting and disconnecting for every insert if you are batching the inserts (e.g. through a buffered wrapper or async wrapper).&lt;br&gt;2.&amp;nbsp; Updated the Async wrapper class so that it doesn't go back to sleep after processing a callback if there are still enough items
 on the queue for a full batch.&lt;br&gt;&lt;br&gt;We did some decent performance testing benchmarks before and after, and saw significant gains in the applicable test cases (by roughly a factor of 5).&amp;nbsp; I can provide more detail on the performance test if someone is truly interested (the test results currently are not written up for release).&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;&lt;br&gt;Jake Milnes&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.net email is sponsored by: Microsoft
&lt;br&gt;Defy all challenges. Microsoft(R) Visual Studio 2008.
&lt;br&gt;&lt;a href=&quot;http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17628959&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Performance-Enhancements-tp17628959p17628959.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-17038582</id>
	<title>Small bug in RichTextBoxTarget</title>
	<published>2008-05-03T12:02:07Z</published>
	<updated>2008-05-03T12:02:07Z</updated>
	<author>
		<name>mattman206</name>
	</author>
	<content type="html">Hello,&lt;br&gt;&lt;br&gt;First off, THANKS for such a great logging framework.&amp;nbsp; NLog is awesome :)&lt;br&gt;&lt;br&gt;That being said, I just found a small bug in the RichTextBoxTarget.&lt;br&gt;&lt;br&gt;In my project, I have a custom control (LogRichTextBox) that is a subclass of the RichTextBox control.&amp;nbsp; When I try to use the RichTextBoxTarget, no text is output to the LogRichTextBox.&amp;nbsp; However, if I change my code to use the standard RichTextBox instead of my custom control, then everything works great.&lt;br&gt;

&lt;br&gt;I&amp;#39;ve traced the problem down to FormHelper.FindControl(), which is used by the RichTextBoxTarget --&lt;br&gt; ...&lt;br&gt;searchControl.GetType() == controlType&lt;br&gt;&lt;br&gt;The method is searching for an _exact_ match between the control and RichTextBox, when it should be looking to see if searchControl can be cast to the controlType.&amp;nbsp; i.e. searchControl.GetType().IsAssignableFrom(controlType).&lt;br&gt;
&lt;br&gt;Hope that helps :)&lt;br&gt;-Matt&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;br&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
&lt;br&gt;Don't miss this year's exciting event. There's still time to save $100. 
&lt;br&gt;Use priority code J8TL2D2. 
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=17038582&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Nlog-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Small-bug-in-RichTextBoxTarget-tp17038582p17038582.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15223154</id>
	<title>Re: class.ToString()</title>
	<published>2008-02-01T01:19:13Z</published>
	<updated>2008-02-01T01:19:13Z</updated>
	<author>
		<name>Boersnoes</name>
	</author>
	<content type="html">To answer my own post: a better sollution is to give your logger a fitting name when creating it.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Boersnoes wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi List,
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Is there a way to obtain the result of the calling class’s ToString() method?
&lt;br&gt;&lt;br&gt;This would enable me to trace the instances instead of the classes of the calling objects.
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;&lt;br&gt;Boris Callens
&lt;br&gt;&lt;br&gt;&lt;br&gt;No virus found in this outgoing message.
&lt;br&gt;Checked by AVG Free Edition. 
&lt;br&gt;Version: 7.5.516 / Virus Database: 269.19.4/1227 - Release Date: 16/01/2008 1:40
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.net email is sponsored by: Microsoft
&lt;br&gt;Defy all challenges. Microsoft(R) Visual Studio 2008.
&lt;br&gt;&lt;a href=&quot;http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Nlog-list mailing list
&lt;br&gt;Nlog-list@lists.sourceforge.net
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/nlog-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/nlog-list&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/class.ToString%28%29-tp14885107p15223154.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14885107</id>
	<title>class.ToString()</title>
	<published>2008-01-16T07:24:43Z</published>
	<updated>2008-01-16T07:24:43Z</updated>
	<author>
		<name>Boersnoes</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=windows-1250&quot;&gt;


&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;Hi List,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Is there a way to obtain the result of the calling class&amp;#8217;s
ToString() method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;This would enable me to trace the instances instead of the
classes of the calling objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Regards&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;Boris Callens&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;BR&gt;

&lt;P&gt;&lt;FONT SIZE=2&gt;No virus found in this outgoing message.&lt;BR&gt;
Checked by AVG Free Edition.&lt;BR&gt;
Version: 7.5.516 / Virus Database: 269.19.4/1227 - Release Date: 16/01/2008 1:40&lt;BR&gt;
&lt;/FONT&gt; &lt;/P&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.net email is sponsored by: Microsoft
&lt;br&gt;Defy all challenges. Microsoft(R) Visual Studio 2008.
&lt;br&gt;&lt;a href=&quot;http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clk.atdmt.c