LokiLogger constructor
LokiLogger({})
Implementation
LokiLogger(
{required this.server,
required this.username,
required this.password,
required String logLevel,
required this.labels})
: super(logLevel: logLevel) {
dio.httpClientAdapter = IOHttpClientAdapter(onHttpClientCreate: (client) {
// Don't trust any certificate just because their root cert is trusted.
final HttpClient client =
HttpClient(context: SecurityContext(withTrustedRoots: false));
// You can test the intermediate / root cert here. We just ignore it.
client.badCertificateCallback = (cert, host, port) => true;
return client;
});
}