public async Task Log(IWebLogContext context) { var fileContext = (FileWebLogContext)context; if (!fileContext.LoggingEnabled) return; var path = GetDirectoryName(fileContext); var targetPath = await Task.Run(delegate { if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } return Path.Combine(path, GetFileName(fileContext)); }); await WriteToFile(fileContext, targetPath); }
public async Task Log(IWebLogContext context) { var fileContext = (FileWebLogContext)context; if (!fileContext.LoggingEnabled) { return; } var path = GetDirectoryName(fileContext); var targetPath = await Task.Run(delegate { if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } return(Path.Combine(path, GetFileName(fileContext))); }); await WriteToFile(fileContext, targetPath); }
public DetailWebLogger(IWebLogContext webLogContext) { this.webLogContext = webLogContext; }