(2) In all suits under ORS 87.228 and 87.700 to 87.736, the court shall, upon entering judgment for the plaintiff, allow as a part of the costs all moneys paid for the filing and recording of the lien, and a reasonable amount for attorney fees at trial and on appeal. [1973 c.647 §7; 1981 c.897 §26]