public IEnumerable <User> GetUsers() { try { Log.Information("File Name: " + _stackFrame.GetMethod().DeclaringType.Name + ".cs " + "NameSpace: " + _stackFrame.GetMethod().DeclaringType.Namespace + " Method Name: GetUser() "); var allUsers = _userRepository.GetUsers(); Log.Information("File Name: " + _stackFrame.GetMethod().DeclaringType.Name + ".cs " + "GetUser() Method Executed Successfully"); return(allUsers); } catch (Exception ex) { Log.Error("Error Message: " + ex.Message + " " + ex.StackTrace); throw; } }