Example #1
0
        protected LogEntry CreateLogEntry(string message, LogOperations LogOperation, Exception ex = null)
        {
            var result = new LogEntry(Request.UserHostAddress,
                User.Identity.Name,
                message,
                LogOperation.ToString(),
                ex?.ToString());

            return result;
        }
Example #2
0
        private ILogEntry CreateInternalError(ILogEntry logEntry, Exception exception)
        {
            var result = new LogEntry(exception.ToString(),
                    LogOperations.LoggerInternalError.ToString(),
                    exception.Message,
                    logEntry.RemoteAddr,
                    logEntry.UserName);

            return result;
        }