You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
using System.IO ;
namespace EntrustSettle.Common.LogHelper ;
public class LogContextStatic
{
static LogContextStatic ( )
{
if ( ! Directory . Exists ( BaseLogs ) )
{
Directory . CreateDirectory ( BaseLogs ) ;
}
}
public const string BaseLogs = "Logs" ;
public const string BasePathLogs = @"Logs" ;
public const string LogSource = "LogSource" ;
public const string AopSql = "AopSql" ;
public const string SqlOutToConsole = "OutToConsole" ;
public const string SqlOutToFile = "SqlOutToFile" ;
public const string OutToDb = "OutToDb" ;
public const string SugarActionType = "SugarActionType" ;
public static readonly string FileMessageTemplate = "{NewLine}Date: {Timestamp:yyyy-MM-dd HH:mm:ss.fff}{NewLine}LogLevel: {Level}{NewLine}Message: {Message}{NewLine}{Exception}" + new string ( '-' , 100 ) ;
public static string Combine ( string path1 )
{
return Path . Combine ( BaseLogs , path1 ) ;
}
public static string Combine ( string path1 , string path2 )
{
return Path . Combine ( BaseLogs , path1 , path2 ) ;
}
public static string Combine ( string path1 , string path2 , string path3 )
{
return Path . Combine ( BaseLogs , path1 , path2 , path3 ) ;
}
}