private void write(string level, string message) { if (!RippleFileSystem.IsSolutionDirectory()) { return; } var log = "{0}: [{1}] {2}{3}".ToFormat(DateTime.Now.ToString(), level, message, Environment.NewLine); _fileSystem.AppendToLogFile(File, log); }
public static CommandExecutionExpression With(Solution solution, bool throwOnFailure = true, bool resetSolution = false) { _target = solution; _forceThrow = throwOnFailure; _resetSolution = resetSolution; RippleLog.RemoveFileListener(); RippleFileSystem.StubCurrentDirectory(solution.Directory); return(new CommandExecutionExpression(() => { _target = null; _forceThrow = false; _resetSolution = false; RippleLog.AddFileListener(); RippleFileSystem.Live(); })); }