Exemplo n.º 1
0
        public void WriteLog(RoboticsLogLevelEnum logLevel, string logString)
        {
            switch (logLevel)
            {
            case RoboticsLogLevelEnum.Error:
                _logger.Error(logString);
                break;

            case RoboticsLogLevelEnum.Warning:
                _logger.Warning(logString);
                break;

            case RoboticsLogLevelEnum.Info:
                _logger.Information(logString);
                break;

            case RoboticsLogLevelEnum.Debug:
                _logger.Debug(logString);
                break;

            default:
                _logger.Information(logString);
                break;
            }
        }
        public static LogMsg GetLogMsg(RoboticsLogLevelEnum _pLogLevel, string _pLogString, string _pServiceName, int _pQNumber)
        {
            LogMsg logMsg = new LogMsg()
            {
                LogLevel   = _pLogLevel,
                LogMessage = GetStringLogMsg(_pLogString, _pServiceName, _pQNumber)
            };

            return(logMsg);
        }