private static FSOptions MakeLog(ICakeContext context, Abstract.ILoggingOptions log) { if (log != null) { return(FSOptions.Translate(log)); } var result = new LoggingOptions(); if (context != null) { result.Info = x => context.Log.Write(Verbosity.Normal, LogLevel.Information, x); result.Warn = x => context.Log.Write(Verbosity.Normal, LogLevel.Warning, x); result.Failure = x => context.Log.Write(Verbosity.Normal, LogLevel.Error, x); result.Echo = x => context.Log.Write(Verbosity.Verbose, LogLevel.Information, x); } return(FSOptions.Translate(result)); }
public static int Collect(this ICakeContext context, Abstract.ICollectOptions collectArgs, Abstract.ILoggingOptions log = null) { return(FSCommand.Collect(collectArgs, MakeLog(context, log))); }
public static int Prepare(this ICakeContext context, Abstract.IPrepareOptions prepareArgs, Abstract.ILoggingOptions log = null) { return(FSCommand.Prepare(prepareArgs, MakeLog(context, log))); }