Configgy

Configgy is a library for handling config files and logging for a scala daemon. The idea is that it should be simple and straightforward, allowing you to plug it in and get started quickly, writing small useful daemons without entering the shadowy world of java frameworks.

Features for configuration include:

Features for logging include:

Download

Online Documentation

Source

Examples

A quick example of a config file:

    <log>
        filename = "/var/log/pingd.log"
        roll = "daily"
        level = "debug"
    </log>

    hostname = "pingd.example.com"
    port = 3000

and code to use it:

    import net.lag.configgy.Configgy
    import net.lag.logging.Logger

    Configgy.configure("/etc/pingd.conf")

    val config = Configgy.config
    val hostname = config.getString("hostname", "localhost")
    val port = config.getInt("port", 3000)

    val log = Logger.get
    log.error("Unable to listen on %s:%d!", hostname, port)

Contact

Robey Pointer <robeypointer@gmail.com>