diff --git a/docs/_sass/_code.scss b/docs/_sass/_code.scss index 099b172..d5a8dae 100644 --- a/docs/_sass/_code.scss +++ b/docs/_sass/_code.scss @@ -40,13 +40,13 @@ } .code-panel--before .code-panel__header { - background: rgba($accent-red, 0.06); + background: rgba($accent-red, 0.08); color: $accent-red; } .code-panel--after .code-panel__header { - background: rgba($primary, 0.06); - color: $primary; + background: rgba($primary, 0.10); + color: $primary-dark; } .code-panel__body { diff --git a/docs/_sass/_hero.scss b/docs/_sass/_hero.scss index 76234cb..86b85f1 100644 --- a/docs/_sass/_hero.scss +++ b/docs/_sass/_hero.scss @@ -10,7 +10,7 @@ justify-content: center; text-align: center; overflow: hidden; - background: linear-gradient(135deg, #f0fafa 0%, #e0f4f4 30%, #f5f9fa 60%, #e8f6f6 100%); + background: linear-gradient(135deg, #f2f6f7 0%, #e6eff1 30%, #f5f7f8 60%, #eaf0f2 100%); padding-top: var(--navbar-height); } diff --git a/docs/_sass/_variables.scss b/docs/_sass/_variables.scss index 0a5b80c..02c0f9a 100644 --- a/docs/_sass/_variables.scss +++ b/docs/_sass/_variables.scss @@ -10,15 +10,15 @@ $primary-glow: rgba(70, 191, 198, 0.25); // Light mode $light-bg: #ffffff; -$light-surface: #f5fafa; -$light-surface-alt: #eaf5f5; +$light-surface: #f4f7f8; +$light-surface-alt: #e8eef0; $light-text: #1a2b3c; -$light-text-muted: #5a6b7c; -$light-border: #d4e8e8; -$light-code-bg: #f0f6f6; -$light-code-border: #d4e8e8; +$light-text-muted: #4d5f6f; +$light-border: #c8d5d9; +$light-code-bg: #f3f5f7; +$light-code-border: #c8d5d9; $light-card-bg: #ffffff; -$light-card-shadow: rgba(70, 191, 198, 0.08); +$light-card-shadow: rgba(70, 191, 198, 0.12); // Dark mode $dark-bg: #0d1520; diff --git a/docs/getting-started.md b/docs/getting-started.md index cb2a3c0..4a4ee22 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -87,6 +87,22 @@ dependencies { ``` +### Set Up Logging Output + +Timer Ninja uses **SLF4J** for logging. Depending on your project, choose one of the following: + +**Spring Boot projects** — no extra setup needed. Spring Boot ships with Logback, so Timer Ninja output will appear in your logs automatically. + +**Non-Spring projects with an SLF4J provider** — if you already have Logback, Log4j2, or another SLF4J-compatible logging framework, you're good to go. Just make sure the log level for `io.github.thanglequoc.timerninja.TimerNinjaUtil` is at least `INFO`. + +**No logging framework?** — enable System.out output at application startup: + +```java +TimerNinjaConfiguration.getInstance().toggleSystemOutLog(true); +``` + +This prints trace output directly to the console — useful for quick testing or simple console applications. + --- ## Annotation-based Tracking diff --git a/docs/index.html b/docs/index.html index ffc1919..eef64ff 100644 --- a/docs/index.html +++ b/docs/index.html @@ -15,7 +15,7 @@ Open Source · Java Library
Track code execution time in Java effortlessly. Get a full call hierarchy with timing & arguments — no heavy tracing frameworks required. @@ -302,6 +302,7 @@
Execute your code — Timer Ninja automatically logs the execution trace.
+Note: Timer Ninja uses SLF4J. Spring Boot projects work out of the box. For other projects without a logging provider, enable console output with TimerNinjaConfiguration.getInstance().toggleSystemOutLog(true).
public void processPayment(User user, int amount) - 770 ms
|-- public boolean changeAmount(User user, int amount) - 306 ms
|-- public void notify(User user) - 258 ms
@@ -317,7 +318,7 @@
Block tracking, custom thresholds, constructor tracking, and more — explore all features in the docs and start measuring Java method execution time the smart way.
diff --git a/wiki/Getting-Started.md b/wiki/Getting-Started.md index d423ea3..837fc8d 100644 --- a/wiki/Getting-Started.md +++ b/wiki/Getting-Started.md @@ -75,6 +75,22 @@ dependencies { ``` +### Set Up Logging Output + +Timer Ninja uses **SLF4J** for logging. Depending on your project, choose one of the following: + +**Spring Boot projects** — no extra setup needed. Spring Boot ships with Logback, so Timer Ninja output will appear in your logs automatically. + +**Non-Spring projects with an SLF4J provider** — if you already have Logback, Log4j2, or another SLF4J-compatible logging framework, you're good to go. Just make sure the log level for `io.github.thanglequoc.timerninja.TimerNinjaUtil` is at least `INFO`. + +**No logging framework?** — enable System.out output at application startup: + +```java +TimerNinjaConfiguration.getInstance().toggleSystemOutLog(true); +``` + +This prints trace output directly to the console — useful for quick testing or simple console applications. + --- ## Annotation-based Tracking