public Bounce() { LogFactory = new TaskLogFactory(); LogOptions = new LogOptions {CommandOutput = false, LogLevel = LogLevel.Warning, ReportTargetEnd = true}; ShellCommand = new ShellCommandExecutor(() => Log); TargetInvoker = new TargetInvoker(this); }
public TeamCityLog(TextWriter output, LogOptions logOptions, ILogMessageFormatter logMessageFormatter) : base(output, output, logOptions, logMessageFormatter) { this.Output = output; LogOptions = logOptions; TeamCityFormatter = new TeamCityFormatter(); }
public Bounce(LogOptions logOptions) { LogFactory = new TaskLogFactory(); LogOptions = logOptions; ShellCommand = new ShellCommandExecutor(() => Log); TargetInvoker = new TargetInvoker(this); }
public Log(TextWriter stdout, TextWriter stderr, LogOptions logOptions, ILogMessageFormatter logMessageFormatter) { Stdout = stdout; Stderr = stderr; LogOptions = logOptions; LogMessageFormatter = logMessageFormatter; }
public ICommandLog Create(string command, string args, TextWriter stdout, TextWriter stderr, LogOptions logOptions) { if (logOptions.CommandOutput) { return new CommandLog(command, args, stdout, stderr); } else { return new NullCommandLog(args); } }
public LogOptions ParseCommandLine(Arguments arguments) { var logOptions = new LogOptions { LogLevel = arguments.Parameter(LogLevelParameter, LogLevel.Warning), CommandOutput = arguments.Parameter(CommandOutputParameter, true), }; SetLogOutput(arguments, logOptions); return logOptions; }
public LogOptions ParseCommandLine(Arguments arguments) { var logOptions = new LogOptions { LogLevel = arguments.Parameter(LogLevelParameter, LogLevel.Warning), CommandOutput = arguments.Parameter(CommandOutputParameter, false), }; SetLogOutput(arguments, logOptions); return(logOptions); }
private void SetLogOutput(Arguments arguments, LogOptions logOptions) { var filename = arguments.Parameter<string>(LogFileParameter, null); if (filename != null) { var textWriter = File.AppendText(filename); textWriter.AutoFlush = true; logOptions.StdErr = textWriter; logOptions.StdOut = textWriter; } else { logOptions.StdErr = Console.Error; logOptions.StdOut = Console.Out; } }
private void SetLogOutput(Arguments arguments, LogOptions logOptions) { var filename = arguments.Parameter <string>(LogFileParameter, null); if (filename != null) { var textWriter = File.AppendText(filename); textWriter.AutoFlush = true; logOptions.StdErr = textWriter; logOptions.StdOut = textWriter; } else { logOptions.StdErr = Console.Error; logOptions.StdOut = Console.Out; } }
public TaskLog(TextWriter stdOut, TextWriter stdErr, LogOptions logOptions) { StdOut = stdOut; StdErr = stdErr; this.logOptions = logOptions; }
public ILog CreateLogForTask(ITask task, TextWriter stdout, TextWriter stderr, LogOptions logOptions) { return new TeamCityLog(stdout); }
public ILog CreateLogForTask(ITask task, TextWriter stdout, TextWriter stderr, LogOptions logOptions) { return new TeamCityLog(stdout, logOptions, new TaskLogMessageFormatter(task)); }