Skip to content

Commit 4d9b176

Browse files
committed
Documentation update
1 parent 2219223 commit 4d9b176

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/main/java/pl/mjaron/tinyloki/TinyLoki.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,23 @@ public class TinyLoki implements java.io.Closeable {
9090
* <p>
9191
* Optionally call {@link #withExactUrl(String)} instead to skip URL value normalization
9292
* and use given URL directly as the endpoint of pushing logs.
93+
* <p>
94+
* Note that after the {@link #open(Settings) open}, library should be closed with one of the {@link #close() close}
95+
* function variant:
96+
* <ul>
97+
* <li>{@link #close()}</li>
98+
* <li>{@link #closeSync()}</li>
99+
* <li>{@link #closeSync(int)}</li>
100+
* <li>{@link #closeSync(int, int)}</li>
101+
* </ul>
93102
*
94103
* @param url URL to Loki HTTP API endpoint, usually ending with <code>/loki/api/v1/push</code>.
104+
* <p>
105+
* If the URL is not ending with <code>/loki/api/v1/push</code>, this path will be appended to the URL.
95106
* @return New instance of {@link Settings} object, initialized with given <code>url</code>.
96107
* @see #withExactUrl(String)
108+
* @see #API_PUSH
109+
* @see #close()
97110
* @since 0.3.0
98111
*/
99112
public static Settings withUrl(final String url) {
@@ -122,6 +135,7 @@ public static Settings withExactUrl(final String url) {
122135
* @param settings Configuration of a newly created {@link TinyLoki}.
123136
* @return New instance of {@link TinyLoki}.
124137
* @see #withUrl(String)
138+
* @see #close()
125139
* @since 0.3.0
126140
*/
127141
public static TinyLoki open(final Settings settings) {
@@ -135,6 +149,7 @@ public static TinyLoki open(final Settings settings) {
135149
* @param user Basic authentication user. If null, BA header will not be sent.
136150
* @param pass Basic authentication password. If null, BA header will not be sent.
137151
* @return New {@link TinyLoki} object.
152+
* @see #close()
138153
* @deprecated Use {@link TinyLoki#withUrl(String)} to initialize settings and finally call {@link Settings#open()}, e.g:
139154
* <pre>
140155
* TinyLoki.withUrl(url).withBasicAuth(user, pass).open();

0 commit comments

Comments
 (0)