The config file:[loggers]keys=root,mySession[handlers]keys=consoleHandler,fileHandler[formatters]keys=myFormatter[logger_root]level=DEBUGhandlers=consoleHandler,fileHandler[logger_mySession]level=DEBUGhandlers=consoleHandler,fileHandlerqualname=mySessionpropagate=0[handler_consoleHandler]class=StreamHandlerlevel=INFOformatter=myFormatterargs=(sys.stdout,)[handler_fileHandler]class=handlers.RotatingFileHandlerlevel=DEBUGformatter=myFormatterargs=('logs/sample_logging.log', 'a', 2048, 5)[formatter_myFormatter]format=%(asctime)s - %(name)s - %(levelname)s - %(message)sdatefmt=%m-%d %H:%MThe script:#! /usr/bin/env python# -*- coding: utf-8 -*-'''Logging using a separated config fileSee advanced topic in http://docs.python.org/2/howto/logging.htmlSee also the file 'logging.conf' in this folder too.Examples: The 'application' code below: logger.debug('debug message') logger.info('info message') Will produce something like this: 2005-03-19 15:10:26,618 - simple_example - DEBUG - debug message 2005-03-19 15:10:26,620 - simple_example - INFO - info message'''__author__ = "Marco Antonio Almeida"__version__ = "0.0.1"__date__ = "26 jun 2013"import loggingimport logging.configimport logging.handlers# create loggerlogging.config.fileConfig('sample_logging.conf')my_log = logging.getLogger('mySession')logger = logging.getLogger()def do_something(): # 'application' code start here print 'Starting using default' logger.debug('one debug message') logger.info('one info message') logger.warn('one warn message') logger.error('one error message') logger.critical('one critical message') print '' print 'Starting using mySession' my_log.debug('one debug message') my_log.info('one info message') my_log.warn('one warn message') my_log.error('one error message') my_log.critical('one critical message') print 'Finished' print ''def main(): do_something()if __name__ == '__main__': main()Enjoy... The codeThe sample starter classusing System;using System.Text;namespace mmcSolutions.SolrParser{ /// /// /// public class Test { /// /// /// public static void TestResultParser() { var file = @"D:\Projetos\Estudos\mmcSolutions.Parser\mmcSolutions.Parser\Sample\Employee.xml"; var xml = System.IO.File.ReadAllText(file, Encoding.Unicode); var obj = ResultParser.Parse(xml); } }}The DTO sample classusing System;namespace mmcSolutions.SolrParser{ /// /// A sample Employee entity. /// public class Employee { /// /// Employee ID. /// [SolrAttribute(Name = "id", Type = SolrType.String, isNullable = false)] public string ID { get; set; } /// /// Name /// [SolrAttribute(Name = "name", Type = SolrType.String, isNullable = false)] public string Name { get; set; } /// /// E-mail /// [SolrAttribute(Name = "email", Type = SolrType.String, isNullable = false)] public string Email { get; set; } /// /// Hire date /// [SolrAttribute(Name = "hiredate", Type = SolrType.Date, isNullable = false)] public DateTime HireDate { get; set; } /// /// Address /// [SolrAttribute(Name = "address", Type = SolrType.String, isNullable = false)] public string Address { get; set; } /// /// Manager /// [SolrAttribute(Name = "sallary", Type = SolrType.Float, isNullable = false)] public decimal Sallary { get; set; } /// /// Status /// [SolrAttribute(Name = "status", Type = SolrType.Short, isNullable = false)] public short Status { get; set; } }}Solr attributeusing System;namespace mmcSolutions.SolrParser{ /// /// /// [AttributeUsage(AttributeTargets.Property)] public sealed class SolrAttribute : System.Attribute { /// /// Attribute class to be used with text file parser. /// public SolrAttribute() : base() { } /// /// The name of field. /// public String Name { get; set; } /// /// Specify Solr data type. /// public SolrType Type { get; set; } /// /// Specify if can be null /// public bool isNullable { get; set; } }}Solr type enumeratorusing System;namespace mmcSolutions.SolrParser{ /// /// /// public enum SolrType { /// /// String solr type /// String, /// /// Array solr type /// Array, /// /// DateTime solr type /// Date, /// /// Int solr type /// Int, /// /// Short solr type /// Short, /// /// Long solr type /// Long, /// /// Decimal solr type /// Decimal, /// /// Double solr type /// Double, /// /// Float /// Float }}The XElement extensions classusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml.Linq;namespace mmcSolutions.SolrParser{ public static class XElementExtensions { public static string GetArray(this XElement e, string nodeName) {