The sittings of every court of justice are public, except that upon the agreement of the parties to a civil action, suit or proceeding, filed with the clerk or entered in the appropriate record, the court may direct the trial, or any other proceeding therein, to be private; upon such order being made, all persons shall be excluded, except the officers of the court, the parties, their witnesses and counsel.
ORS 1.040