diff --git a/core/src/main/java/com/predic8/membrane/core/router/hotdeploy/YamlHotDeploymentThread.java b/core/src/main/java/com/predic8/membrane/core/router/hotdeploy/YamlHotDeploymentThread.java index b03267e1dc..2e14d4edb6 100644 --- a/core/src/main/java/com/predic8/membrane/core/router/hotdeploy/YamlHotDeploymentThread.java +++ b/core/src/main/java/com/predic8/membrane/core/router/hotdeploy/YamlHotDeploymentThread.java @@ -63,7 +63,7 @@ public void run() { sleep(1000); } - log.info("Configuration Changed."); + log.debug("Configuration changed."); if (!reloader.reload()) { log.debug("YAML Hot Deployment Thread stopped after reload failure."); diff --git a/core/src/main/java/com/predic8/membrane/core/router/hotdeploy/YamlRouterReloader.java b/core/src/main/java/com/predic8/membrane/core/router/hotdeploy/YamlRouterReloader.java index 0e32d11e01..063323bb42 100644 --- a/core/src/main/java/com/predic8/membrane/core/router/hotdeploy/YamlRouterReloader.java +++ b/core/src/main/java/com/predic8/membrane/core/router/hotdeploy/YamlRouterReloader.java @@ -72,7 +72,7 @@ public boolean reload() { YamlConfigurationSource reloadedSource = loadSnapshotIntoRouter(router, validatedSource); router.start(); setSource(reloadedSource); - log.info("Configuration Reloaded."); + log.info("Configuration reloaded."); return true; } catch (Exception e) { logReloadFailure(e); diff --git a/distribution/tutorials/getting-started/00-First-API.yaml b/distribution/tutorials/getting-started/00-First-API.yaml index ff0e3fbf95..9abd28bc2f 100644 --- a/distribution/tutorials/getting-started/00-First-API.yaml +++ b/distribution/tutorials/getting-started/00-First-API.yaml @@ -25,7 +25,7 @@ # 3.) Stop Membrane: # Press Ctrl+C in the terminal. # -# 4.) Continue with file 10-Logging.yaml +# 5.) Continue with file 05-Hot-Reload.yaml # # Troubleshooting: # Check if your machine can reach the public API: diff --git a/distribution/tutorials/getting-started/05-Hot-Reload.yaml b/distribution/tutorials/getting-started/05-Hot-Reload.yaml new file mode 100644 index 0000000000..442041996a --- /dev/null +++ b/distribution/tutorials/getting-started/05-Hot-Reload.yaml @@ -0,0 +1,39 @@ +# yaml-language-server: $schema=https://www.membrane-api.io/v7.3.1.json +# +# Tutorial: Hot Reload +# +# Membrane watches your YAML file and reloads the configuration automatically +# whenever you save a change. No restart needed. +# +# 1.) Start Membrane: +# Linux/Mac: +# ./membrane.sh -c 05-Hot-Reload.yaml +# Windows: +# membrane.cmd -c 05-Hot-Reload.yaml +# +# 2.) Call the API: +# +# curl http://localhost:2000 +# +# You should see a list of public APIs from api.predic8.de. +# +# 3.) While Membrane is still running, open this file in a text editor. +# Change the url below from https://api.predic8.de to https://httpbin.org +# and save the file. +# The console shows "Configuration Changed" within a second. +# +# 4.) Call the API again: +# +# curl http://localhost:2000 +# +# The response now comes from httpbin.org. No restart was needed. +# +# 5.) Stop Membrane: +# Press Ctrl+C in the terminal. +# +# 6.) Continue with file 10-Logging.yaml + +api: + port: 2000 + target: + url: https://api.predic8.de diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 2d061360b8..584603c61c 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -43,6 +43,9 @@ PRIO 3: ## Membrane 8.0.0 (Java 25) +- Log harmonization: + - Decide if log message start with uppercase or lowercase. + - e.g.: Error loading log configuration., Started 1 API:, Closing server port:, listening at '*:2000' - Upgrade baseline to Java 25 - Bump `javac.source`/`javac.target` from 21 to 25 in the root pom.xml - Simplify `Util.createNewThreadPool()`: the reflective lookup of `Executors.newVirtualThreadPerTaskExecutor` and the `--enable-preview` handling are leftovers from the Java 19/20 preview era; call it directly and drop the `-Dmembrane.virtualthreads` fallback (or keep the flag as a plain if).