UI/API for testing Apache Velocity templates
Refer the swagger spec or the swagger UI
- Endpoint:
https://velocity-template-tester.onrender.com/api/expandTemplate - Request Content-Type:
application/json,application/x-yaml - Response Content-Type:
text/plain
{
"template": "Hello ${user}",
"parameters": {
"name": "John Doe"
}
}template: Hello ${user}
parameters:
name: John Doedocker run --rm \
-p 8080:8080 \
devatherock/velocity-template-tester:1.0.0
- Set the environment variable
LOGGER_LEVELS_ROOTtoDEBUGto enable all debug logs - custom and framework - Set the environment variable
LOGGER_LEVELS_IO_GITHUB_DEVATHEROCKtoDEBUGto enable debug logs only in custom code - For fine-grained logging control, supply a custom logback.xml file
and set the environment variable
JAVA_OPTSto-Dlogback.configurationFile=/path/to/custom/logback.xml
To output logs as JSON, set the environment variable JAVA_OPTS to -Dlogback.configurationFile=logback-json.xml. Refer
logstash-logback-encoder documentation to customize the field names and
formats in the log