Allow user to specify log level

Defaults to L_WARN.