Hi,

I unfortunately posted to this JIRA issue *before* reading the
contributing section of the log4net website:

http://issues.apache.org/jira/browse/LOG4NET-10  (Add %v pattern to
output assembly version)

So I figured I would email the list now, as opposed to later if people
had questions/didn't know my goal... :-)

Essentially, I attached a small patch for the issue that allows one to
use %asm-ver and %asm-desc patterns in log output patterns.  The way I
implemented it, it will only work for ILog instances that were
retrieved via .GetLogger(Type) or .GetLogger(Asm) or some .GetLogger
that passes Type or Assembly information.  In the log repository there
I keep a reference to the assembly, and if that reference exists
(meaning it was created via passing type/asm information), the log
output options %asm-ver and %asm-desc will be available.

I did make my patch as a unified diff (just had the extension as
.patch, don't know if there's an "convention" differences between
.diff and .patch, I've always treated them as the same thing -- but
let me know if they are different, I have not sent many patches into
to open source projects before...).  I did add two new files, but they
are part of the .patch I sent in, but let me know if they do not get
recreated after applying the patch.  I did not add the two new files
to the VS.NET projects, as I have VS2005 and the projects were all
2003 -- so after applying the patch you'll have to add the two new
files, which are:

src/Layout/Pattern/AsmDescPatternConverter.cs
src/Layout/Pattern/AsmVersionPatternConverter.cs

Sorry about not emailing the list earlier, didn't seem to be a high
priority issue (and hadn't been updated since '05) -- so we actually
wrote this code a few months ago to support our build process (we
stamp our assemblies with their svn revision number as part of the
assembly version, and throw the svn url into the assembly description
attribute -- this greatly helps our deployments when our users send
error logs back to us -- we can easily know the exact version and svn
url of the code where they encountered the problem).  Luckily the code
is short and fairly simple, but let me know if there's anything I can
do to help get it committed (or even if it follows your general
design, and if not, what would...).

Regards,
-Mark

Reply via email to