The Lone C++ Coder's Blog

The Lone C++ Coder's Blog

The continued diary of an experienced C++ programmer. Thoughts on C++ and other languages I play with, Emacs, functional, non functional and sometimes non-functioning programming.

Timo Geusch

2-Minute Read

<p>I’ve mentioned in the past how you can configure the <a href="https://www.lonecpluspluscoder.com/2018/01/24/how-to-enable-logging-for-the-mongodb-java-driver/">MongoDB Java driver output from Java</a>. Most Clojure applications that use MongoDB use a database driver that wraps the official MongoDB Java driver. I personally use <a href="https://github.com/michaelklishin/monger">monger</a> for a lot of my projects, but also occasionally created my own wrapper. The methods described in…

Timo Geusch

4-Minute Read

<p>MongoDB has a handy command to rename a collection, <a href="https://docs.mongodb.com/manual/reference/method/db.collection.renameCollection/">db.collectionName.renameCollection().</a> There is currently no equivalent to rename a database. Now if we accept that from time to time, one positively, absolutely just <strong>has</strong> to rename a database in MongoDB, well, there are a couple of options. Unfortunately they aren’t quite as straight forward as single MongoDB command. All methods…

Timo Geusch

5-Minute Read

<p>RHEL 7 – and CentOS 7, which I used for this test – use tuned.conf to set a lot of system settings. Several of the tuned settings affect MongoDB’s performance; some are important enough that mongod actually triggers startup warnings. The main setting is transparent huge pages, which is a setting that does not work very well with databases in general.</p>

Timo Geusch

2-Minute Read

<p>I will show you how to enable logging in the MongoDB Java driver and also how to set and change the log level. The <a href="https://mongodb.github.io/mongo-java-driver/">official mongoDB Java driver</a> uses <a href="https://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html">java.util.logging</a> as its default logging framework or sl4j if the latter is present. It can be very useful to enable logging in the MongoDB drivers to trace how the driver is interacting with…

Recent Posts

Categories

About

A developer's journey. Still trying to figure out this software thing after several decades.