bitcoin-s/db-commons
Torkel Rogstad a76f61f97c Add configurable logging to data directory (#640)
* Add logging to data directory

In this commit we add the ability for the node, chain
and wallet projects (+ the server) to log to the users
data directory instead of whatever directory the
binaries was launched from. This is inherently a bit
more complicated than our previous setup, because
we need to read the user directory before we can create
loggers. As a result of this, some files/methods were
moved around, so the relevant app config could be
found in scope.

We also  introduce several logging categories that can be
tuned individually through user configuration. These logggers
are exposed both as traits that give a field `logger`, or
as methods that return the required logger.

* Add datadir configuration to AppConfig

In this commit we add support for AppConfig to pick up
the data directory configuration file. We also add
a section to the contributing guide on how to tune
logging levels.

* Pass data directories explicitly for configuration
2019-08-01 06:01:56 -05:00
..
src/main Add configurable logging to data directory (#640) 2019-08-01 06:01:56 -05:00
README.md Node (#490) 2019-06-04 09:53:00 -05:00

db-commons

This is a project that is meant to contain re-usable database related infrastructure for bitcoin-s. This project is a dependency of wallet and node.

The library that bitcoin-s currently uses for database related things is called Slick.

The most important file in this project is DbConfig. This provides a common way for databases to be accessed from configuration files. For more information on how Slick configuration files work please see this reference.

This project expects the following keys for databases

  • mainnetDb
  • testnet3Db
  • regtestDb
  • unittestDb

This will be read by DbConfig to specify database information related to a specific project. You can look at the database configuration for the node project for an example of how this works.