Пример #1
0
        public string FormatMessage(Message unFormatedMessage)
        {
            (string prefix, string unFormatedRawMessage, string tag) = unFormatedMessage;

            string dayMonthYear     = DateTimeUtility.GetDayMonthYear();
            string hourMinuteSecond = DateTimeUtility.GetHourMinuteSecond();

            string formatedMessage =
                $"[{prefix}] {dayMonthYear} | {hourMinuteSecond} | {tag}: {unFormatedRawMessage}";

            return(formatedMessage);
        }
Пример #2
0
        public string FormatMessage(Message unFormatedMessage)
        {
            (string prefix, string unFormatedRawMessage, string tag) = unFormatedMessage;

            string dayMonthYear     = DateTimeUtility.GetDayMonthYear();
            string hourMinuteSecond = DateTimeUtility.GetHourMinuteSecond();

            string infoLine =
                $"[{prefix}] {dayMonthYear} | {hourMinuteSecond} | {tag}";

            string breakLine = getBreakLine(infoLine.Length);

            string formatedMessage =
                $"{infoLine}\n{breakLine}\n{unFormatedRawMessage}\n";

            return(formatedMessage);
        }