diff --git a/config.ini.example b/config.ini.example index 39b8f95..2831d05 100644 --- a/config.ini.example +++ b/config.ini.example @@ -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: * diff --git a/main.cpp b/main.cpp index 4624069..c6eabf6 100644 --- a/main.cpp +++ b/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;