Add option to set log level from config file.
This commit is contained in:
parent
bd3f62c044
commit
11e93bb138
@ -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: *
|
||||
|
2
main.cpp
2
main.cpp
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user