Skip to content

Commit

Permalink
Fix log4cplus error on Agent startup
Browse files Browse the repository at this point in the history
Moved LogVersionInfo call after initializing log4cplus.

Fixed default log security level in sample agent conf file.

Change-Id: I5cba7a5573d870421c2c0c7f2bb6bd44b897d5a5
Closes-Bug: #1705696
  • Loading branch information
pmarcinkiewicz1 committed Jun 7, 2018
1 parent d168e73 commit 65e9513
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/vnsw/agent/contrail-vrouter-agent.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
log_file=/var/log/contrail/contrail-vrouter-agent.log

# Log severity levels. Possible values are SYS_EMERG, SYS_ALERT, SYS_CRIT,
# SYS_ERR, SYS_WARN, SYS_NOTICE, SYS_INFO and SYS_DEBUG. Default is SYS_DEBUG
# SYS_ERR, SYS_WARN, SYS_NOTICE, SYS_INFO and SYS_DEBUG. Default is SYS_NOTICE
log_level=SYS_NOTICE

# Enable/Disable local file logging. Possible values are 0 (disable) and 1 (enable)
Expand Down
8 changes: 4 additions & 4 deletions src/vnsw/agent/contrail/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ int main(int argc, char *argv[]) {
init.set_create_vhost(false);
}

string build_info;
GetBuildInfo(build_info);
MiscUtils::LogVersionInfo(build_info, Category::VROUTER);

init.set_agent_param(&params);
// kick start initialization
int ret = 0;
if ((ret = init.Start()) != 0) {
return ret;
}

string build_info;
GetBuildInfo(build_info);
MiscUtils::LogVersionInfo(build_info, Category::VROUTER);

Agent *agent = init.agent();
TaskScheduler::GetInstance()->set_event_manager(agent->event_manager());
agent->event_manager()->Run();
Expand Down

0 comments on commit 65e9513

Please sign in to comment.