Message DSL
DSL for constructing structured Message instances.
Provides a builder-like syntax to compose multi-line logs, key-value pairs, and toggle console output.
Example:
lumina.info {
+"Starting application" // is a new line
+"Version: 1.0.0"
+("Hello, " + "World!") // also a new line, but output is "Hello, World!"
logToConsole = false // disable console output
emptyLine() // insert a blank line
line("Config:") // also a new line
keyValue {
define("Config", "dbUrl", "jdbc://localhost:5432")
}
}
Content copied to clipboard
Supports both free-form text and structured key-value fields.
Use line or the unary plus operator (
+
) to add a plain line.Use keyValue to add structured data (
Object(key=value)
).Use emptyLine to insert a blank line.
Use logToConsole to enable/disable console output for this message.
Finally, call build (done automatically by Lumina.log) to produce a Message.
Types
Link copied to clipboard
class KeyValueDSL