Exemplo n.º 1
0
        public static string FormatGeneralMessage(string methodName, string message)
        {
            var output = new FormatOutput()
            {
                MethodName = methodName,
                LogDate    = DateTime.Now,
                Message    = $"{methodName} {message}"
            };

            return(JsonConvert.SerializeObject(output));
        }
Exemplo n.º 2
0
        public static string FormatExceptionMethodMessage(string methodName, Exception exception)
        {
            var output = new FormatOutput()
            {
                MethodName = methodName,
                LogDate    = DateTime.Now,
                Message    = $"Exception in:{methodName}:{exception.Message}:{exception.StackTrace}"
            };

            return(JsonConvert.SerializeObject(output));
        }