Add option to set log level from config file.

This commit is contained in:
Michał Słomkowski 2016-04-18 01:30:10 +02:00
parent bd3f62c044
commit 11e93bb138
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,7 @@
[general]
# valid values for log level are: ERROR, WARN, NOTICE, INFO, DEBUG
logLevel = NOTICE
[sip]
# list of valid SIP URIs for incoming connections separated by space
# supported wildcards: *

View File

@ -42,6 +42,8 @@ int main(int argc, char *argv[]) {
config::Configuration conf(argv[1]);
logger.setPriority(log4cpp::Priority::getPriorityValue(conf.getString("general.logLevel")));
sip::IncomingConnectionValidator connectionValidator(conf.getString("sip.validUriExpression"));
boost::asio::io_service ioService;