/// <summary> /// Get Logger (Sync) /// </summary> /// <param name="className">class full name</param> /// <returns>VLogger object</returns> // [MethodImpl(MethodImplOptions.Synchronized)] public static VLogger GetVLogger(string className) { lock (_lock) { LogManager manager = LogManager.GetLogManager(); //get the current logmanager object if (string.IsNullOrEmpty(className)) { className = ""; } Logger result = manager.GetLogger(className); //find if the logger already exist if (result != null && result is VLogger) //if yes, return the object { return((VLogger)result); } //other, we will have to create new VLogger newLogger = new VLogger(className); newLogger.SetLevel(VLogMgt.GetLevel()); manager.AddLogger(newLogger); return(newLogger); } }