|
32 | 32 | ]; |
33 | 33 |
|
34 | 34 | if[not esInstance like .es.cfg.requiredUrlPrefix; |
35 | | - .log.error "Unsupported Elasticsearch API URL; must be HTTP or HTTPS [ URL: ",string[esInstance]," ]"; |
| 35 | + .log.if.error "Unsupported Elasticsearch API URL; must be HTTP or HTTPS [ URL: ",string[esInstance]," ]"; |
36 | 36 | '"InvalidElasticSearchInstanceException"; |
37 | 37 | ]; |
38 | 38 |
|
|
42 | 42 |
|
43 | 43 | .es.target:esInstance; |
44 | 44 |
|
45 | | - .log.info "Elasticsearch instance set [ URL: ",string[.es.target]," ]"; |
| 45 | + .log.if.info "Elasticsearch instance set [ URL: ",string[.es.target]," ]"; |
46 | 46 | }; |
47 | 47 |
|
48 | 48 | / @returns (Table) All the indices available in the current Elasticsearch instance |
49 | 49 | / @see .es.http.get |
50 | 50 | .es.getAllIndices:{ |
51 | | - .log.info "Querying for all available indices from Elasticsearch"; |
| 51 | + .log.if.info "Querying for all available indices from Elasticsearch"; |
52 | 52 | :.es.http.get "_cat/indices?v&format=json"; |
53 | 53 | }; |
54 | 54 |
|
|
86 | 86 | .es.http.get:{[relativeUrl] |
87 | 87 | url:.es.i.buildUrl relativeUrl; |
88 | 88 |
|
89 | | - .log.debug "Elasticsearch HTTP GET [ URL: ",string[url]," ]"; |
| 89 | + .log.if.debug "Elasticsearch HTTP GET [ URL: ",string[url]," ]"; |
90 | 90 |
|
91 | 91 | :.j.k .es.i.http10get url; |
92 | 92 | }; |
|
121 | 121 |
|
122 | 122 | url:.es.i.buildUrl .es.i.normaliseIndex[index],`doc,id; |
123 | 123 |
|
124 | | - .log.debug "Elasticsearch HTTP POST [ URL: ",string[url]," ]"; |
| 124 | + .log.if.debug "Elasticsearch HTTP POST [ URL: ",string[url]," ]"; |
125 | 125 |
|
126 | 126 | :.j.k .Q.hp[url; .es.cfg.postMimeTypes`default; content]; |
127 | 127 | }; |
|
147 | 147 |
|
148 | 148 | content:.es.cfg.bulkRowSeparator,(.es.cfg.bulkRowSeparator sv .j.j each contentTable),"\n"; |
149 | 149 |
|
150 | | - .log.debug "Elasticsearch HTTP Bulk POST [ URL: ",string[url]," ] [ Size: ",string[count content]," bytes ]"; |
| 150 | + .log.if.debug "Elasticsearch HTTP Bulk POST [ URL: ",string[url]," ] [ Size: ",string[count content]," bytes ]"; |
151 | 151 |
|
152 | 152 | :.j.k .es.i.http10post[url; .es.cfg.postMimeTypes`bulk; content]; |
153 | 153 | }; |
|
158 | 158 | / @returns (Symbol) The index unmodified if it has a date component, otherwise the original index with today's date appended to it |
159 | 159 | .es.i.normaliseIndex:{[index] |
160 | 160 | if[not index like "*????.??.??*"; |
161 | | - .log.info "No date found in index name. Automatically adding today's date [ Index: ",string[index]," ]"; |
| 161 | + .log.if.info "No date found in index name. Automatically adding today's date [ Index: ",string[index]," ]"; |
162 | 162 | index:`$"-" sv string (index; .time.today[]); |
163 | 163 | ]; |
164 | 164 |
|
|
173 | 173 | / @throws InvalidElasticSearchUrlException If the URL specified is of an incorrect type |
174 | 174 | .es.i.buildUrl:{[relativeUrl] |
175 | 175 | if[null .es.target; |
176 | | - .log.error "Cannot use Elasticsearch API, no instance specified yet [ Request URL: ",.Q.s1[relativeUrl]," ]"; |
| 176 | + .log.if.error "Cannot use Elasticsearch API, no instance specified yet [ Request URL: ",.Q.s1[relativeUrl]," ]"; |
177 | 177 | '"NoElasticsearchUrlException"; |
178 | 178 | ]; |
179 | 179 |
|
|
0 commit comments