Beispiel #1
0
        public LogDTO AddExceptionLog(ExceptionLogDTO logDto)
        {
            User user = null;

            //this check must be move to domain servi
            if (!string.IsNullOrWhiteSpace(logDto.UserName))
            {
                user = userRep.GetUserById(new PartyId(logDto.UserName));
            }
            var log = logService.AddExceptionLog(logDto.Code, LogLevel.FromDisplayName <LogLevel>(logDto.LogLevel),
                                                 user, logDto.ClassName, logDto.MethodName, logDto.Title, logDto.Messages);

            return(logDTOMapper.MapToModel(log));
        }