Platinum Partner

Layer Level Logging

Our projects design as modular, layered   in order to reduce development process and spent time.So our solution design become more simple, can be controled.You can use in below code stucture for especially enterprise solutions in projects with a lot of  logical layer.

Let’s take a look our enterprise codes.


gist link ; https://gist.github.com/yemrekeskin/5613861#file-layerlevellogging-cs

/// 
/// possible layers
/// 
public abstract class LayerDefinitions
{
     public static string ServiceHostLayer { get { return "Sample.Service.Host"; } }
     public static string ServiceRepositorylayer { get { return "Sample.Service.Repository"; } }
     public static string CommonRepositorylayer { get { return "Sample.Common.Repository"; } }
     public static string DataAccessLayer { get { return "Sample.DataAccess"; } }
     public static string WebSecurityLayer { get { return "Sample.WebSecurity"; } }
     public static string CoreLayer { get { return "Sample.Core"; } }
     public static string UtilLayer { get { return "Sample.Util"; } }
}
 
/// 
///  loging library : Log4net
/// 
public class LoggerService
{
    public static log4net.ILog Log
    {
        get
        {
            return log4net.LogManager
                            .GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
        }
    }
        
    public static void Setup(HttpContext context)
    {
        string path = context.Server.MapPath("log4net.config");
        if (File.Exists(path))
        {
            log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(path));
        }
    }
}
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}