Updating to v2.17, in new ABMaterial version, now I obtain too many waiting for value messages in log console
I agree. We have a simple calculator and
B4J's jServer ABM 2.17 outputs three
(3) messages with each [CALCULATE] button press.
Here's the click event.
'*--------------------------------------------------------------- btn_Clicked
'*
Sub btn_Clicked(Target As String)
Private const NO_GROUPING=False As Boolean
Private sLength As ABMInput = page.Component("inp1")
Private sWidth As ABMInput = page.Component("inp2" )
Private sDepth As ABMInput = page.Component("inp3")
Private nProductTons As Double
Private amount As ABMLabel = page.Component("lblamt")
nProductTons = Calc.ProductTons( sLength.Text, sWidth.Text, sDepth.Text, 1 )
amount.Text = "{NBSP}" & NumberFormat2( nProductTons, 1, 1, 1, NO_GROUPING ) & "{NBSP} (Tons)"
amount.Refresh
End Sub
It gives the feel that this is a debug version of the library. Granted a library may have debug tracing built in but this would normally be configurable. And perhaps by degree (debug level 1, 2, and so on...)
Attached is a simple logger we use in our projects (feel free to edit/improve and use).
Debug logging is integrated into all our apps for both release and production builds. When apps are released in the wild there are always little surprises that weren't accounted for during design. That's when you enable the debug logging to help sort things out.
In our release builds debugging is disabled by default. If we get in a fix, we can remotely turn it on:
Mtelog.DebugOn( True )
Then all calls to Mtelog.Debug ("Greetings from the debug log!") are output.
This "Waiting for value" metric is valuable info. But in a release build this could be tested against a threshold (possibly configurable) that when exceeded it would generate a warning.
If ( waittime > 100 ) Then
Mtelog.Warning( "Wait for value exceeds 100 ms, waittime=" & waittime )
End If
** Update **
The waiting message output can be toggled on/off through a jServer option.
Public srvr As Server
srvr.Initialize("srvr")
srvr.LogWaitingMessages = False