Ejemplo n.º 1
0
 private void Initialize(PluginRollingFileAppender baseAppender, IActivityLogPathProvider path)
 {
     Folder             = baseAppender.Folder;
     AppendToFile       = baseAppender.AppendToFile;
     CountDirection     = baseAppender.CountDirection;
     DatePattern        = CsvLayout.DATE_TIME_FORMAT;
     Encoding           = baseAppender.Encoding;
     ErrorHandler       = baseAppender.ErrorHandler;
     File               = GetFileName(_accountName, _profileName, baseAppender.File.GetFileName(), path);
     ImmediateFlush     = baseAppender.ImmediateFlush;
     Layout             = new CsvLayout();
     LockingModel       = new MinimalLock();
     MaxFileSize        = baseAppender.MaxFileSize;
     MaxSizeRollBackups = baseAppender.MaxSizeRollBackups;
     MaximumFileSize    = baseAppender.MaximumFileSize;
     Name               = path.GetLogPathFor(_accountName, _profileName, baseAppender.Name.GetFileName());
     RollingStyle       = baseAppender.RollingStyle;
     StaticLogFileName  = baseAppender.StaticLogFileName;
     Threshold          = baseAppender.Threshold;
 }
 private static ILog GetLogger(IActivityLogPathProvider path, string name, IPluginContext context)
 {
     return(LogManager.GetLogger(path.GetLogPathFor(context.AccountName.Value, context.ProfileName.Value, name)));
 }
		private string GetFileName(string accountName, string profileName, string fileName, IActivityLogPathProvider path)
		{
			return Folder.Combine(path.GetLogPathFor(accountName, profileName, fileName));
		}
		private void Initialize(PluginRollingFileAppender baseAppender, IActivityLogPathProvider path)
		{
			Folder = baseAppender.Folder;
			AppendToFile = baseAppender.AppendToFile;
			CountDirection = baseAppender.CountDirection;
			DatePattern = CsvLayout.DATE_TIME_FORMAT;
			Encoding = baseAppender.Encoding;
			ErrorHandler = baseAppender.ErrorHandler;
			File = GetFileName(_accountName, _profileName, baseAppender.File.GetFileName(), path);
			ImmediateFlush = baseAppender.ImmediateFlush;
			Layout = new CsvLayout();
			LockingModel = new MinimalLock();
			MaxFileSize = baseAppender.MaxFileSize;
			MaxSizeRollBackups = baseAppender.MaxSizeRollBackups;
			MaximumFileSize = baseAppender.MaximumFileSize;
			Name = path.GetLogPathFor(_accountName, _profileName, baseAppender.Name.GetFileName());
			RollingStyle = baseAppender.RollingStyle;
			StaticLogFileName = baseAppender.StaticLogFileName;
			Threshold = baseAppender.Threshold;
		}
Ejemplo n.º 5
0
 private string GetFileName(string accountName, string profileName, string fileName, IActivityLogPathProvider path)
 {
     return(Folder.Combine(path.GetLogPathFor(accountName, profileName, fileName)));
 }
        private Logger GetLogger(ActivityType type)
        {
            var loggerName = _loggersNames[type];

            return((Logger)LogManager.GetLogger(_path.GetLogPathFor(_accountName, _profileName, loggerName)).Logger);
        }
		private static ILog GetLogger(IActivityLogPathProvider path, string name, IPluginContext context)
		{
			return LogManager.GetLogger(path.GetLogPathFor(context.AccountName.Value, context.ProfileName.Value, name));
		}