public static ILoggerMode getLoggerMode(LoggerMode mode)
        {
            //Create a new MySqlConnection if no viable one is available
            if (m_server == null || m_server.State != MongoServerState.Connected)
            {
                string      connectionString = Settings.Store.GetEncryptedSetting("ConnectionString");
                MongoClient client           = new MongoClient(connectionString);
                m_server = client.GetServer();
            }

            ILoggerMode logger = null;

            if (mode == LoggerMode.EVENT)
            {
                logger = new EventLoggerMode();
            }
            else if (mode == LoggerMode.SESSION)
            {
                logger = new SessionLogger();
            }
            else
            {
                throw new ArgumentException("Invalid LoggerMode");
            }

            logger.SetConnection(m_server);
            return(logger);
        }
        public static ILoggerMode getLoggerMode(LoggerMode mode)
        {
            //Create a new MySqlConnection if no viable one is available
            if (m_server == null || m_server.State != MongoServerState.Connected)
            {
                string connectionString = Settings.Store.GetEncryptedSetting("ConnectionString");
                MongoClient client = new MongoClient(connectionString);
                m_server = client.GetServer();
            }

            ILoggerMode logger = null;
            if (mode == LoggerMode.EVENT)
                logger = new EventLoggerMode();
            else if (mode == LoggerMode.SESSION)
                logger = new SessionLogger();
            else
                throw new ArgumentException("Invalid LoggerMode");

            logger.SetConnection(m_server);
            return logger;
        }