This repository was archived by the owner on Dec 3, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql
postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import scala.util.Success
3535object MySQLConnection {
3636 final val Counter = new AtomicLong ()
3737 final val MicrosecondsVersion = Version (5 ,6 ,0 )
38+ final val log = Log .get[MySQLConnection ]
3839}
3940
4041class MySQLConnection (
@@ -47,13 +48,14 @@ class MySQLConnection(
4748 with Connection
4849{
4950
51+ import MySQLConnection .log
52+
5053 // validate that this charset is supported
5154 charsetMapper.toInt(configuration.charset)
5255
5356
5457 private final val connectionCount = MySQLConnection .Counter .incrementAndGet()
5558 private final val connectionId = s " [mysql-connection- $connectionCount] "
56- private final val log = Log .getByName(connectionId)
5759 private implicit val internalPool = executionContext
5860
5961 private final val connectionHandler = new MySQLConnectionHandler (
Original file line number Diff line number Diff line change @@ -34,8 +34,9 @@ import io.netty.channel.EventLoopGroup
3434import java .util .concurrent .CopyOnWriteArrayList
3535
3636object PostgreSQLConnection {
37- val Counter = new AtomicLong ()
38- val ServerVersionKey = " server_version"
37+ final val Counter = new AtomicLong ()
38+ final val ServerVersionKey = " server_version"
39+ final val log = Log .get[PostgreSQLConnection ]
3940}
4041
4142class PostgreSQLConnection
@@ -59,8 +60,8 @@ class PostgreSQLConnection
5960 group,
6061 executionContext
6162 )
63+
6264 private final val currentCount = Counter .incrementAndGet()
63- private final val log = Log .getByName(s " ${this .getClass.getName}" )
6465 private final val preparedStatementsCounter = new AtomicInteger ()
6566 private final implicit val internalExecutionContext = executionContext
6667
You can’t perform that action at this time.
0 commit comments