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
35
35
object MySQLConnection {
36
36
final val Counter = new AtomicLong ()
37
37
final val MicrosecondsVersion = Version (5 ,6 ,0 )
38
+ final val log = Log .get[MySQLConnection ]
38
39
}
39
40
40
41
class MySQLConnection (
@@ -47,13 +48,14 @@ class MySQLConnection(
47
48
with Connection
48
49
{
49
50
51
+ import MySQLConnection .log
52
+
50
53
// validate that this charset is supported
51
54
charsetMapper.toInt(configuration.charset)
52
55
53
56
54
57
private final val connectionCount = MySQLConnection .Counter .incrementAndGet()
55
58
private final val connectionId = s " [mysql-connection- $connectionCount] "
56
- private final val log = Log .getByName(connectionId)
57
59
private implicit val internalPool = executionContext
58
60
59
61
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
34
34
import java .util .concurrent .CopyOnWriteArrayList
35
35
36
36
object 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 ]
39
40
}
40
41
41
42
class PostgreSQLConnection
@@ -59,8 +60,8 @@ class PostgreSQLConnection
59
60
group,
60
61
executionContext
61
62
)
63
+
62
64
private final val currentCount = Counter .incrementAndGet()
63
- private final val log = Log .getByName(s " ${this .getClass.getName}" )
64
65
private final val preparedStatementsCounter = new AtomicInteger ()
65
66
private final implicit val internalExecutionContext = executionContext
66
67
You can’t perform that action at this time.
0 commit comments