Example #1
0
        public Log AddLog(Log log)
        {
            var logger = loggerFactory.Create(primaryLoggerKey);

            try
            {
                if (logLevels.Contains(log.LogLevel))
                {
                    logger.AddLog(log);
                }
            }
            catch
            {
                log = AddLogWithSecondaryLogger(log);
            }
            finally
            {
                loggerFactory.Release(logger);
            }
            return(log);
        }
        public Response CreateLog([FromBody] CreateLogRequest request)
        {
            var serviceCreated = _service.Create(request.LogType);

            return(serviceCreated.CreateLog(request));
        }