Permalink
Browse files

Produce loggers.txt file with all the loggers

  • Loading branch information...
1 parent 824f0bb commit 72d729c57124d30c6bb1309ef3fc5e22aaf54fbf @fitzchak fitzchak committed Mar 23, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/Runner/Program.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text;
using NHibernateLoggerExtractor;
@@ -10,15 +11,20 @@ class Program
{
static void Main(string[] args)
{
+ var outputPath = "loggers.txt";
+
var extracter = new ExtractLoggers();
var loggers = extracter.GetStaticLoggers();
Console.WriteLine(string.Format("fields count: {0}", loggers.Count));
+ var builder = new StringBuilder();
foreach (var logger in loggers)
{
-
+ builder.AppendFormat("new {5}LoggerType = {0}{1}{0}, ClassName={0}{2}{0}, FieldName = {0}{3}{0}{6},{4}", "\"", logger.LoggerType, logger.ClassName, logger.FieldName, Environment.NewLine, "{", "}");
}
+ var text = builder.ToString();
+ File.WriteAllText(outputPath, text, Encoding.UTF8);
}
}
}

0 comments on commit 72d729c

Please sign in to comment.