Xentara v1.2.1
User Manual
Loading...
Searching...
No Matches
Debugging Tools

The Debugging Service Provider

Xentara has a built-in service provider named Debugging. This service provider provides element types that can be used for debugging Xentara systems.

Debugging Inspectors

Debugging inspectors are microservices that print attributes of Xentara elements to the standard output.

The following is a possible output for an inspector that prints five noise values generated by a signal generator:

2021-08-04 13:54:48.000000000 UTC+02:00 - Signal Generator.Noise 1.value: 0.26521971194059785
2021-08-04 13:54:48.000000000 UTC+02:00 - Signal Generator.Noise 2.value: 0.714662006106531
2021-08-04 13:54:48.000000000 UTC+02:00 - Signal Generator.Noise 3.value: 0.8146399618265746
2021-08-04 13:54:48.000000000 UTC+02:00 - Signal Generator.Noise 4.value: 0.24390532843995444
2021-08-04 13:54:48.000000000 UTC+02:00 - Signal Generator.Noise 5.value: 0.41490853415830775

The output of an inspector can have an optional title:

Noise Values:
-------------
2021-08-04 13:54:48.000000000 UTC+02:00 - Signal Generator.Noise 1.value: 0.26521971194059785
2021-08-04 13:54:48.000000000 UTC+02:00 - Signal Generator.Noise 2.value: 0.714662006106531
2021-08-04 13:54:48.000000000 UTC+02:00 - Signal Generator.Noise 3.value: 0.8146399618265746
2021-08-04 13:54:48.000000000 UTC+02:00 - Signal Generator.Noise 4.value: 0.24390532843995444
2021-08-04 13:54:48.000000000 UTC+02:00 - Signal Generator.Noise 5.value: 0.41490853415830775

Debugging inspectors expose a single task named dump. You can insert that task into an execution pipeline and attach it to a timer or an event.

Accessing Debugging Inspectors

Debugging inspectors have the following members:

Attributes
keyThe debugging inspector’s primary key.
nameThe debugging inspector’s name. The name is the last component of the primary key.
UUIDThe unique UUID of the debugging inspector.
Tasks
dumpPrints the current values of the attached attributes to the standard output.

To refer to a member, use its primary key. The primary key of the dump task of a debugging inspector called “My.Debugging.Inspector” is “My.Debugging.Inspector.dump”.

Debugging Loggers

Debugging loggers are microservices that allow writing arbitrary text to the standard output.

The following is a possible output for a logger microservice:

2021-09-22 00:24:22.124250000 UTC+02:00: Hello, world!

Loggers can also log warning an error messages:

Noise Values:
-------------
2021-09-22 03:18:22.003070000 UTC+02:00: WARNING: Something annoying just happened
2021-09-22 14:00:57.802440000 UTC+02:00: ERROR: Something went terribly wrong

The log messages can also have an optional caption:

Noise Values:
-------------
2021-09-24 22:09:42.643700000 UTC+02:00 - Pay attention to this: Hello again, world!
2021-09-24 23:44:56.456170000 UTC+02:00 - Pay attention to this: WARNING: Something else annoying just happened
2021-09-25 06:10:08.654970000 UTC+02:00 - Pay attention to this: ERROR: Something went terribly wrong again

Loggers expose three write-only attributes named text, warningText, and errorText. for the three types of messages. You log a text by writing a value to the appropriate attribute.

Accessing Debugging Loggers

Debugging Loggers have the following members:

Attributes
keyThe logger’s primary key.
nameThe logger’s name. The name is the last component of the primary key.
UUIDThe unique UUID of the logger.
textWrite-only attribute that prints the written value to the standard output as a normal message whenever it is written.
warningTextWrite-only attribute that prints the written value to the standard output as a warning message whenever it is written.
errorTextWrite-only attribute that prints the written value to the standard output as an error message whenever it is written.

To refer to a attribute, use its primary key. The primary key of the text attribute of a logger called “My.Debugging.Logger” is “My.Debugging.Logger.text”.