--- title: logql package description: > The `logql` package provides functions for using [LogQL](https://grafana.com/docs/loki/latest/logql/) to query a [Loki](https://grafana.com/oss/loki/) data source. menu: flux_v0_ref: name: logql parent: contrib/qxip identifier: contrib/qxip/logql weight: 31 cascade: introduced: 0.192.0 --- The `logql` package provides functions for using [LogQL](https://grafana.com/docs/loki/latest/logql/) to query a [Loki](https://grafana.com/oss/loki/) data source. Import the `contrib/qxip/logql` package: ```js import "contrib/qxip/logql" ``` The primary function in this package is `logql.query_range()` ## Options ```js option logql.defaultAPI = "/loki/api/v1/query_range" option logql.defaultURL = "http://127.0.0.1:3100" ``` ### defaultAPI `defaultAPI` is the default LogQL Query Range API Path. ### defaultURL `defaultURL` is the default LogQL HTTP API URL. ## Functions {{< children type="functions" show="pages" >}}