Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Layer Level Logging
/// <summary>
/// possible layers
/// </summary>
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"; } }
}
/// <summary>
/// loging library : Log4net
/// </summary>
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));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.