You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,22 @@ dependencies {
87
87
</plugin>
88
88
```
89
89
90
+
### Set Up Logging Output
91
+
92
+
Timer Ninja uses **SLF4J** for logging. Depending on your project, choose one of the following:
93
+
94
+
**Spring Boot projects** — no extra setup needed. Spring Boot ships with Logback, so Timer Ninja output will appear in your logs automatically.
95
+
96
+
**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`.
97
+
98
+
**No logging framework?** — enable System.out output at application startup:
Measure <spanclass="text-gradient">Java Method Execution Time</span><br>with a Single Annotation
18
+
Measure <spanclass="text-gradient">Java Code Execution Time</span><br>with a Single Annotation
19
19
</h1>
20
20
<pclass="hero__subtitle animate-fade-up">
21
21
Track code execution time in Java effortlessly. Get a full call hierarchy with timing & arguments — no heavy tracing frameworks required.
@@ -302,6 +302,7 @@ <h3>Annotate Your Methods</h3>
302
302
<divclass="step-card__content">
303
303
<h3>Run & See the Trace 🐇</h3>
304
304
<p>Execute your code — Timer Ninja automatically logs the execution trace.</p>
305
+
<pstyle="font-size: 0.9rem; opacity: 0.85;"><strong>Note:</strong> Timer Ninja uses SLF4J. Spring Boot projects work out of the box. For other projects without a logging provider, enable console output with <code>TimerNinjaConfiguration.getInstance().toggleSystemOutLog(true)</code>.</p>
305
306
<pre><code>public void processPayment(User user, int amount) - 770 ms
306
307
|-- public boolean changeAmount(User user, int amount) - 306 ms
307
308
|-- public void notify(User user) - 258 ms</code></pre>
@@ -317,7 +318,7 @@ <h3>Run & See the Trace 🐇</h3>
<h2class="animate-fade-up">Ready to <spanclass="text-gradient">Track Like a Ninja</span>?</h2>
321
+
<h2class="animate-fade-up">Ready to <spanclass="text-gradient">track them all?</span>?</h2>
321
322
<pclass="animate-fade-up" style="max-width: 560px; margin: 0 auto 2rem; font-size: 1.1rem;">
322
323
Block tracking, custom thresholds, constructor tracking, and more — explore all features in the docs and start measuring Java method execution time the smart way.
Copy file name to clipboardExpand all lines: wiki/Getting-Started.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,22 @@ dependencies {
75
75
</plugin>
76
76
```
77
77
78
+
### Set Up Logging Output
79
+
80
+
Timer Ninja uses **SLF4J** for logging. Depending on your project, choose one of the following:
81
+
82
+
**Spring Boot projects** — no extra setup needed. Spring Boot ships with Logback, so Timer Ninja output will appear in your logs automatically.
83
+
84
+
**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`.
85
+
86
+
**No logging framework?** — enable System.out output at application startup:
0 commit comments