InfluxDBClientFactory.create() params question
win434545299 opened this issue · 2 comments
Steps to reproduce:
I saw this code in InfluxDB, and the logLevel is not work.
-
String loglevel = "BODY"
-
InfluxDBClient client = InfluxDBClientFactory.create(String.format("%s:%s?readTimeout=%s&writeTimeout" +
"=%s&connectTimeout=%s" +
"&logLevel=%s", host, port, readTimeout, writeTimeout, connectTimeout, logLevel), token.toCharArray(), organization, bucket);
3.the logLevel is not work.
Expected behavior:
Describe what you expected to happen.
Actual behavior:
Describe What actually happened.
Specifications:
- Client Version: 2.0
- InfluxDB Version: 5.0.0
- JDK Version: zulu1.8
- Platform:macos
Hi @win434545299,
the connection string is supported only for: public static InfluxDBClient create(@Nonnull final String connectionString)
. You have to use something like:
String connectionString = String.format("%s:%s?readTimeout=%s&writeTimeout" +
"=%s&connectTimeout=%s" +
"&logLevel=%s&org=%s&bucket=%s&token=%s", "http://localhost", "8086", "10000", "10000", "10000", "BODY", "my-org", "my-bucket", "my-token");
InfluxDBClientFactory.create(connectionString);
Regards
This issue has been closed because it has not had recent activity. Please reopen if this issue is still important to you and you have additionally information.