Skip to content

Commit

Permalink
Update scalafmt config
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Jan 15, 2025
1 parent 4e41eef commit f986f51
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
13 changes: 12 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
version = 3.8.2
maxColumn = 120
runner.dialect = scala3
runner.dialect = scala213
fileOverride {
"glob:**/scala-3/**" {
runner.dialect = scala3
}
"glob:**/examples/**" {
runner.dialect = scala3
}
"glob:**/effects/ox/**" {
runner.dialect = scala3
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ class CachingBackend[F[_], P](delegate: GenericBackend[F, P], cache: Cache[F], c
}
}
} else {
log.debug(s"Request ${request.showBasic} is not cacheable (${
if (!cacheableFromConfig) "due to config" else "due to response-as"
}).")
log.debug(s"Request ${request.showBasic} is not cacheable (${if (!cacheableFromConfig) "due to config"
else "due to response-as"}).")
delegate.send(request) // we know that we won't be able to cache the response
}
}
Expand Down
7 changes: 3 additions & 4 deletions core/src/main/scala/sttp/client4/logging/Log.scala
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ class DefaultLog[F[_]](
private def before(request: GenericRequest[_, _], _logRequestBody: Boolean, _logRequestHeaders: Boolean): F[Unit] =
logger(
level = beforeRequestSendLogLevel,
message = s"Sending request: ${
if (beforeCurlInsteadOfShow && _logRequestBody && _logRequestHeaders) request.toCurl(sensitiveHeaders)
else request.show(includeBody = _logRequestBody, _logRequestHeaders, sensitiveHeaders)
}",
message =
s"Sending request: ${if (beforeCurlInsteadOfShow && _logRequestBody && _logRequestHeaders) request.toCurl(sensitiveHeaders)
else request.show(includeBody = _logRequestBody, _logRequestHeaders, sensitiveHeaders)}",
throwable = None,
context = logContext.forRequest(request)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object OpenTelemetryMetricsConfig {
buckets = HistogramCollectorConfig.DefaultSizeBuckets,
unit = HistogramCollectorConfig.Bytes
)
),
)
): OpenTelemetryMetricsConfig = usingMeter(
openTelemetry.meterBuilder(meterConfig.name).setInstrumentationVersion(meterConfig.version).build(),
clock,
Expand Down

0 comments on commit f986f51

Please sign in to comment.