Runtime
SDL provides a set of runtime libraries that implement the fundamental non-functional requirements of all services.
Currently, the SDL runtime includes:
The runtime is initialised automatically when a service is instantiated. This initialisation should be performed as early as possible in the service's lifecycle to ensure log messages are formatted correctly, and appropriate instrumentation is injected for tracing purposes.
For example, in TypeScript:
import { TestService } from "@cartax/sdl/services/Test";
import { Log } from "@cartax/sdl/runtime/logging";
service = TestService.instance();
// The logging API can now be used...
Log.info("my well-formatted message");