Mediation is a confidential process and you cannot normally discuss what has happened in a mediation with any party that is not taking part in the mediation.
The CEDR Model Mediation Agreement, which all parties will sign, states that everything discussed during the mediation process must be kept confidential, unless otherwise agreed. This includes if the mediation does not settle.
If you want someone to be with you at the mediation (for example a spouse), you can discuss it with the mediator and the other party. Anyone who joins you is also bound by confidentiality.
A court will not be told what has happened during the mediation. However, you can normally tell them that a mediation has taken place and that it did, or did not settle.
You can learn more about mediation and access CEDR's Model Mediation agreement here.