Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to close the debug info? #14

Closed
cookeem opened this issue Jan 8, 2016 · 3 comments
Closed

How to close the debug info? #14

cookeem opened this issue Jan 8, 2016 · 3 comments

Comments

@cookeem
Copy link

cookeem commented Jan 8, 2016

Debug sql info like this, how to close it?

10:54:10.023 [system-akka.persistence.dispatchers.default-plugin-dispatcher-5] DEBUG s.async.AsyncConnectionPool$ - Borrowed a new connection from scalikejdbc.async.internal.mysql.MySQLConnectionPoolImpl@1ed13381
[WARN] [01/08/2016 10:54:10.024] [system-akka.persistence.dispatchers.default-plugin-dispatcher-6] [akka.serialization.Serialization(akka://system)] Using the default Java serializer for class [actor.PersistenceBasicObj$ExampleState] which is not recommended because of performance implications. Use another serializer or disable this warning using the setting 'akka.actor.warn-about-java-serializer-usage'
10:54:10.031 [system-akka.persistence.dispatchers.default-plugin-dispatcher-6] DEBUG s.async.AsyncConnectionPool$ - Borrowed a new connection from scalikejdbc.async.internal.mysql.MySQLConnectionPoolImpl@1ed13381
10:54:10.038 [system-akka.persistence.dispatchers.default-plugin-dispatcher-5] DEBUG scalikejdbc.async.TxAsyncDBSession - [SQL Execution] 'INSERT INTO test_journal (persistence_key, sequence_nr, message) VALUES (?, ?, ?)' with (2,11,[B@6d8b440c)
10:54:10.043 [system-akka.persistence.dispatchers.default-plugin-dispatcher-6] DEBUG scalikejdbc.async.TxAsyncDBSession - [SQL Execution] 'INSERT INTO test_snapshot (persistence_key, sequence_nr, created_at, snapshot) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE created_at = ?, snapshot = ?' with (2,10,1452221650023,[B@beaa9fc,1452221650023,[B@beaa9fc)
10:54:10.046 [system-akka.persistence.dispatchers.default-plugin-dispatcher-5] DEBUG s.async.AsyncConnectionPool$ - Borrowed a new connection from scalikejdbc.async.internal.mysql.MySQLConnectionPoolImpl@1ed13381
10:54:10.055 [system-akka.persistence.dispatchers.default-plugin-dispatcher-5] DEBUG scalikejdbc.async.TxAsyncDBSession - [SQL Execution] 'INSERT INTO test_journal (persistence_key, sequence_nr, message) VALUES (?, ?, ?)' with (2,12,[B@7fb8247f)

@okumin
Copy link
Owner

okumin commented Jan 10, 2016

@cookeem akka-persistence-sql-async logs information by using ActorLogging.
So you can configure the loglevel in application.conf.

Please refer to this sample.

@cookeem
Copy link
Author

cookeem commented Jan 11, 2016

Hi okumin, thanks for your reply, but I have already set akka.loglevel = "WARNING" or akka.loglevel = "INFO",but the log still show there. My akka version: 2.4.1, scala version: 2.11.7.

Here is my application.conf:

akka.log-dead-letters = off
akka.loglevel = "WARNING"
akka.actor {
provider = "akka.cluster.ClusterActorRefProvider"
}
akka {
remote {
log-remote-lifecycle-events = off
netty.tcp {
hostname = "localhost"
port = 0
}
}
cluster {
seed-nodes = [
"akka.tcp://cluster@localhost:2551"]
auto-down-unreachable-after = 10s
}
}
akka.persistence {
journal.plugin = "akka-persistence-sql-async.journal"
snapshot-store.plugin = "akka-persistence-sql-async.snapshot-store"
}
akka-persistence-sql-async {
journal.class = "akka.persistence.journal.sqlasync.MySQLAsyncWriteJournal"
snapshot-store.class = "akka.persistence.snapshot.sqlasync.MySQLSnapshotStore"
user = "root"
password = "password"
url = "jdbc:mysql://localhost/akka_persistence"
max-pool-size = 4
wait-queue-capacity = 10000
metadata-table-name = "test_metadata"
journal-table-name = "test_journal"
snapshot-table-name = "test_snapshot"
}

@okumin
Copy link
Owner

okumin commented Jan 11, 2016

@cookeem I have tried that configuration, but it seems to work correctly.

akka-persistence-sql-async-sample

Debug logs appear on logging-debug project, but not on logging-warning project.
I tried on sbt console.

Could you try to reproduce the problem on akka-persistence-sql-async-sample and show me that code?

@okumin okumin closed this as completed Oct 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants