static void LogError(string configPath, Exception ex) { LoggingService.LogError("Load gulp tasks failed. ", ex); string logMessage = GettextCatalog.GetString("Failed to load {0}{1}{2}", configPath, Environment.NewLine, ex.Message); TaskRunnerLogger.WriteLine(logMessage); }
public static void Log(string message) { if (string.IsNullOrEmpty(message)) { return; } TaskRunnerLogger.WriteLine(DateTime.Now.ToString() + ": " + message); }
public async Task <ITaskRunnerConfig> ParseConfig(ITaskRunnerCommandContext context, string configPath) { try { return(await Task.Run(() => { TaskRunnerLogger.WriteLine("TestTaskRunnerProvider.ParseConfig configPath={0}", configPath); ITaskRunnerNode hierarchy = LoadHierarchy(configPath); return new TaskRunnerConfig(hierarchy); })); } catch (Exception ex) { TaskRunnerLogger.WriteLine("Load failed. {0}", ex.Message); return(CreateErrorTaskRunnerConfig(ex)); } }