Skip to content

Commit dbcffd6

Browse files
author
ostrygun
committed
zio2.0.15 with logback.xml ( no logback-test)
1 parent 851e743 commit dbcffd6

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

build.sbt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ThisBuild / scalaVersion := "3.2.1"
2-
ThisBuild / version := "2.0.0"
1+
ThisBuild / scalaVersion := "3.3.0"
2+
ThisBuild / version := "2.0.1"
33
ThisBuild / organization := "io.github.ollls"
44
ThisBuild / organizationName := "ollls"
55
ThisBuild / versionScheme := Some("strict")
@@ -48,10 +48,10 @@ lazy val root = (project in file("."))
4848
name := "zio-tls-http",
4949
maxErrors := 3,
5050
retrieveManaged := true,
51-
libraryDependencies += "dev.zio" %% "zio" % "2.0.8" % "provided",
52-
libraryDependencies += "dev.zio" %% "zio-test" % "2.0.8",
53-
libraryDependencies += "dev.zio" %% "zio-json" % "0.4.2",
54-
libraryDependencies += "dev.zio" %% "zio-logging-slf4j" % "2.1.5",
51+
libraryDependencies += "dev.zio" %% "zio" % "2.0.15",
52+
libraryDependencies += "dev.zio" %% "zio-test" % "2.0.15",
53+
libraryDependencies += "dev.zio" %% "zio-json" % "0.5.0",
54+
libraryDependencies += "dev.zio" %% "zio-logging-slf4j" % "2.1.13",
5555
libraryDependencies += "org.slf4j" % "slf4j-api" % "2.0.4",
5656
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.3.5"
5757
)

src/main/scala/server/FileUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ object FileUtils {
7171
//https://zio.dev/zio-logging/slf4j
7272
//access
7373
//_ <- Logs.log_access(req, StatusCode.OK, body.size)
74-
_ <- ZIO.logInfo( req.method.toString + " " + req.uri.toString() + " " + StatusCode.OK.value + " " + body.size ) @@ SLF4J.loggerName( "access")
74+
_ <- ZIO.logInfo( req.method.toString + " " + req.uri.toString() + " " + StatusCode.OK.value + " " + body.size ) @@ zio.logging.loggerName("access")
7575
s <-
7676
if (file_name.toString.endsWith(".jpg")) {
7777
ZIO.attempt(headerStream("image/jpeg", file_path.toString) ++ fstream)

src/main/scala/server/HttpRouter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ class HttpRouter[Env](val appRoutes: List[HttpRoutes[Env]]) {
379379

380380
if (resp.isChunked) {
381381
ZIO.logDebug(req.method.toString + " " + req.uri.toString() + " " + status.value + " chunked") *>
382-
ZIO.logInfo(req.method.toString + " " + req.uri.toString() + " " + status.value + " chunked") @@ SLF4J.loggerName("access") *>
382+
ZIO.logInfo(req.method.toString + " " + req.uri.toString() + " " + status.value + " chunked") @@ zio.logging.loggerName("access") *>
383383
ResponseWriters.writeFullResponseFromStream(ch, resp).refineToOrDie[Exception].map(_ => 0)
384384
} else
385385
(for {
@@ -397,7 +397,7 @@ class HttpRouter[Env](val appRoutes: List[HttpRoutes[Env]]) {
397397
case _ => ResponseWriters.writeNoBodyResponse(ch, status, new String(body.toArray), true)
398398
}
399399
_ <- ZIO.logDebug(req.method.toString + " " + req.uri.toString() + " " + status.value + " " + body.size)
400-
_ <- ZIO.logInfo(req.method.toString + " " + req.uri.toString() + " " + status.value + " " + body.size) @@ SLF4J.loggerName("access")
400+
_ <- ZIO.logInfo(req.method.toString + " " + req.uri.toString() + " " + status.value + " " + body.size) @@ zio.logging.loggerName("access")
401401

402402
} yield (0)).refineToOrDie[Exception]
403403

0 commit comments

Comments
 (0)