Как отключить ведение журнала драйвера mongodb? - PullRequest
0 голосов
/ 27 апреля 2020

Я подключился к серверу mongodb в моем приложении clojure + shadow-cl js, и как clojure repl, так и cl js -repl периодически отображают информацию регистрации:

2020-04-27 15:43:14,333 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-00-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.cluster - Updating cluster description to  {type=REPLICA_SET, servers=[{address=cluster0-shard-00-00-ww5gh.mongodb.net:27017, type=REPLICA_SET_SECONDARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=22.6 ms, state=CONNECTED}, {address=cluster0-shard-00-01-ww5gh.mongodb.net:27017, type=REPLICA_SET_SECONDARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=20.2 ms, state=CONNECTED}, {address=cluster0-shard-00-02-ww5gh.mongodb.net:27017, type=REPLICA_SET_PRIMARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=22.4 ms, state=CONNECTED}] 
2020-04-27 15:43:14,333 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-02-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.cluster - Updating cluster description to  {type=REPLICA_SET, servers=[{address=cluster0-shard-00-00-ww5gh.mongodb.net:27017, type=REPLICA_SET_SECONDARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=22.6 ms, state=CONNECTED}, {address=cluster0-shard-00-01-ww5gh.mongodb.net:27017, type=REPLICA_SET_SECONDARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=20.2 ms, state=CONNECTED}, {address=cluster0-shard-00-02-ww5gh.mongodb.net:27017, type=REPLICA_SET_PRIMARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=22.7 ms, state=CONNECTED}] 
2020-04-27 15:43:14,932 [XNIO-1 I/O-13] DEBUG io.undertow.websockets.core.request - UT025003: Decoding WebSocket Frame with opCode 1 
2020-04-27 15:43:22,145 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-01-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.cluster - Checking status of cluster0-shard-00-01-ww5gh.mongodb.net:27017 
2020-04-27 15:43:22,145 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-01-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.protocol.command - Sending command '{"ismaster": 1, "$db": "admin", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1588016580, "i": 2}}, "signature": {"hash": {"$binary": {"base64": "w/czHSxejSRK/C/k02tdLQnaRxk=", "subType": "00"}}, "keyId": 6777715635859226627}}}' with request id 25260 to database admin on connection [connectionId{localValue:100, serverValue:103115}] to server cluster0-shard-00-01-ww5gh.mongodb.net:27017 
2020-04-27 15:43:22,161 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-01-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.protocol.command - Execution of command with request id 25260 completed successfully in 16.51 ms on connection [connectionId{localValue:100, serverValue:103115}] to server cluster0-shard-00-01-ww5gh.mongodb.net:27017 
2020-04-27 15:43:22,162 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-01-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.cluster - Updating cluster description to  {type=REPLICA_SET, servers=[{address=cluster0-shard-00-00-ww5gh.mongodb.net:27017, type=REPLICA_SET_SECONDARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=22.6 ms, state=CONNECTED}, {address=cluster0-shard-00-01-ww5gh.mongodb.net:27017, type=REPLICA_SET_SECONDARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=19.6 ms, state=CONNECTED}, {address=cluster0-shard-00-02-ww5gh.mongodb.net:27017, type=REPLICA_SET_PRIMARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=22.7 ms, state=CONNECTED}] 
2020-04-27 15:43:24,338 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-00-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.cluster - Checking status of cluster0-shard-00-00-ww5gh.mongodb.net:27017 
2020-04-27 15:43:24,338 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-02-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.cluster - Checking status of cluster0-shard-00-02-ww5gh.mongodb.net:27017 
2020-04-27 15:43:24,339 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-00-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.protocol.command - Sending command '{"ismaster": 1, "$db": "admin", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1588016595, "i": 1}}, "signature": {"hash": {"$binary": {"base64": "rOVQeuBwIEgQnmmAJs4ylRWzPtA=", "subType": "00"}}, "keyId": 6777715635859226627}}}' with request id 25261 to database admin on connection [connectionId{localValue:101, serverValue:107380}] to server cluster0-shard-00-00-ww5gh.mongodb.net:27017 
2020-04-27 15:43:24,339 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-02-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.protocol.command - Sending command '{"ismaster": 1, "$db": "admin", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1588016595, "i": 1}}, "signature": {"hash": {"$binary": {"base64": "rOVQeuBwIEgQnmmAJs4ylRWzPtA=", "subType": "00"}}, "keyId": 6777715635859226627}}}' with request id 25262 to database admin on connection [connectionId{localValue:102, serverValue:132898}] to server cluster0-shard-00-02-ww5gh.mongodb.net:27017 
2020-04-27 15:43:24,363 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-00-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.protocol.command - Execution of command with request id 25261 completed successfully in 23.75 ms on connection [connectionId{localValue:101, serverValue:107380}] to server cluster0-shard-00-00-ww5gh.mongodb.net:27017 
2020-04-27 15:43:24,363 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-00-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.cluster - Updating cluster description to  {type=REPLICA_SET, servers=[{address=cluster0-shard-00-00-ww5gh.mongodb.net:27017, type=REPLICA_SET_SECONDARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=22.8 ms, state=CONNECTED}, {address=cluster0-shard-00-01-ww5gh.mongodb.net:27017, type=REPLICA_SET_SECONDARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=19.6 ms, state=CONNECTED}, {address=cluster0-shard-00-02-ww5gh.mongodb.net:27017, type=REPLICA_SET_PRIMARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=22.7 ms, state=CONNECTED}] 
2020-04-27 15:43:24,363 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-02-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.protocol.command - Execution of command with request id 25262 completed successfully in 23.93 ms on connection [connectionId{localValue:102, serverValue:132898}] to server cluster0-shard-00-02-ww5gh.mongodb.net:27017 
2020-04-27 15:43:24,364 [cluster-ClusterId{value='5ea55fa97eda171d0065e0f9', description='null'}-cluster0-shard-00-02-ww5gh.mongodb.net:27017] DEBUG org.mongodb.driver.cluster - Updating cluster description to  {type=REPLICA_SET, servers=[{address=cluster0-shard-00-00-ww5gh.mongodb.net:27017, type=REPLICA_SET_SECONDARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=22.8 ms, state=CONNECTED}, {address=cluster0-shard-00-01-ww5gh.mongodb.net:27017, type=REPLICA_SET_SECONDARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=19.6 ms, state=CONNECTED}, {address=cluster0-shard-00-02-ww5gh.mongodb.net:27017, type=REPLICA_SET_PRIMARY, TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name='region', value='US_EAST_1'}]}, roundTripTime=23.0 ms, state=CONNECTED}] 

Я хочу заставить эту информацию замолчать, потому что она мне не помогает и отвлекает меня от хорошего интерактивного опыта в реплее. Эти сообщения появляются периодически и перемещаются, изменяя положение курсора и местоположение подсказки. Как это исправить?

Я пробовал эту ссылку: http://clojuremongodb.info/articles/misc.html

и добавил [org.slf4j / slf4j-nop "1.7.12" ] зависимость в моем project.clj, но просто сделать это не работает.

...