Ejemplo n.º 1
0
        public static void PrettyLog(this ExecResult self, Logging.ILogger logger, string prefix = "", string suffix = "")
        {
            var content = prefix + self.PrettyPrint() + suffix;

            switch (self.Status)
            {
            case ExecStatus.Success:
                logger.Info(content);
                break;

            case ExecStatus.Warn:
                logger.Warn(content);
                break;

            case ExecStatus.Error:
                logger.Error(content);
                break;

            case ExecStatus.Fatal:
            default:
                logger.Fatal(content);
                break;
            }
        }