Skip to content

Commit

Permalink
rx-html (feature): Enable logging in RxElements with info/debug/trace…
Browse files Browse the repository at this point in the history
…, etc. (#3121)

- rx-html (feature): Enable logging in RxElements with info/debug/trace,
etc.
- cleanup
  • Loading branch information
xerial authored Aug 8, 2023
1 parent 7f48419 commit aee227f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import wvlet.airframe.rx.html.RxEmbedding._

/**
*/
abstract class RxElement(val modifiers: List[Seq[HtmlNode]] = List.empty) extends HtmlNode { self =>
abstract class RxElement(val modifiers: List[Seq[HtmlNode]] = List.empty) extends HtmlNode with LogSupport { self =>

/**
* Render this element
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,14 @@ class RxElementTest extends AirSpec {
}
}
}

test("logging in RxElements") {
new RxElement() {
info("RxElement logging test")
debug("RxElement logging test")
override def render: RxElement = {
div("hello")
}
}
}
}

0 comments on commit aee227f

Please sign in to comment.