Textlog.textlog
The textlog
widgets to display log messages.
This widget inherits from Textview.textview
and provides methods to display log messages.
inherit Stk.Textview.textview
Function for each log level inserts the given message with a tag associated to header characters: Texttag
.tag_debug, Texttag
.tag_info, Texttag
.tag_warning, Texttag
.tag_error or Texttag
.tag_app.
The theme property of the widget will use this tag to display the message header with the required text properties.
method insert_msg : ?src:Logs.src ->
tags:Stk.Texttag.T.t list ->
string ->
unit
insert_msg ?src ~tags str
inserts the given message str
. Optional argument src
indicates the log source. If it is provided, then the message is preceded by the string "[source]"
associated to given text tags. source
is the log source name.