public void LogRunnerFinished(IFlubuRunner runner)
        {
            // reset the depth counter to make the build report non-indented
            executionDepthCounter = 0;

            LogTargetDurations(runner);

            WriteLine(ConsoleColor.DarkGray, String.Empty);
            if (runner.HasFailed)
            {
                WriteLine(ConsoleColor.Red, "BUILD FAILED");
            }
            else
            {
                WriteLine(ConsoleColor.Green, "BUILD SUCCESSFUL");
            }

            TimeSpan buildDuration = runner.BuildStopwatch.Elapsed;

            WriteLine(ConsoleColor.White, "Build finish time: {0:g}", DateTime.Now);
            WriteLine(
                ConsoleColor.White,
                "Build duration: {0:D2}:{1:D2}:{2:D2} ({3:d} seconds)",
                buildDuration.Hours,
                buildDuration.Minutes,
                buildDuration.Seconds,
                (int)buildDuration.TotalSeconds);
        }
 public void LogRunnerFinished(IFlubuRunner runner)
 {
     foreach (IFlubuLogger logger in loggers)
     {
         logger.LogRunnerFinished(runner);
     }
 }
Beispiel #3
0
        public void LogRunnerFinished(IFlubuRunner runner)
        {
            // reset the depth counter to make the build report non-indented
            executionDepthCounter = 0;

            if (runner.HasFailed)
            {
                log.Error("BUILD FAILED");
            }
            else
            {
                log.Info("BUILD SUCCESSFUL");
            }

            TimeSpan buildDuration = runner.BuildStopwatch.Elapsed;

            log.InfoFormat(CultureInfo.InvariantCulture, "Build finish time: {0:g}", DateTime.Now);
            log.InfoFormat(
                CultureInfo.InvariantCulture,
                "Build duration: {0:D2}:{1:D2}:{2:D2} ({3:d} seconds)",
                buildDuration.Hours,
                buildDuration.Minutes,
                buildDuration.Seconds,
                (int)buildDuration.TotalSeconds);
        }
Beispiel #4
0
 public void LogRunnerFinished(IFlubuRunner runner)
 {
     AddMessageToQueue(runner.HasFailed ? "BUILD FAILED" : "BUILD SUCCESSFUL");
     if (this.projectTargetStack.Count > 0)
     {
         this.projectTargetStack.Pop();
     }
 }
        private void LogTargetDurations(IFlubuRunner runner)
        {
            WriteLine(ConsoleColor.White, String.Empty);

            SortedList <string, IFlubuRunnerTarget> sortedTargets = new SortedList <string, IFlubuRunnerTarget>();

            foreach (IFlubuRunnerTarget target in runner.Targets.Values)
            {
                sortedTargets.Add(target.TargetName, target);
            }

            foreach (IFlubuRunnerTarget target in sortedTargets.Values)
            {
                if (target.TargetStopwatch.ElapsedTicks > 0)
                {
                    WriteLine(
                        ConsoleColor.Magenta,
                        "Target {0} took {1} s",
                        target.TargetName,
                        (int)target.TargetStopwatch.Elapsed.TotalSeconds);
                }
            }
        }