Skip to content

Commit b875c51

Browse files
committed
logging: update whitespace in Appender.cpp and Appender.hpp
1 parent 29b49d1 commit b875c51

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

logging/Appender.cpp

+16-17
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Appender::Appender(std::string name) :
2222
ports()->addEventPort("LogPort", log_port );
2323

2424
properties()->addProperty(layoutName_prop);
25-
properties()->addProperty(layoutPattern_prop);
25+
properties()->addProperty(layoutPattern_prop);
2626
properties()->addProperty(priorityThreshold_prop);
2727
}
2828

@@ -32,21 +32,20 @@ Appender::~Appender()
3232

3333
bool Appender::configureThreshold()
3434
{
35-
log4cpp::Priority::Value priority = log4cpp::Priority::NOTSET;
36-
try
37-
{
38-
priority = log4cpp::Priority::getPriorityValue( boost::to_upper_copy( priorityThreshold_prop.rvalue() ) );
39-
40-
}
41-
catch (std::invalid_argument)
42-
{
43-
// \todo more descriptive
44-
RTT::Logger::In in(getName());
45-
RTT::log(RTT::Error) << "Bad log4cpp priority: " << priorityThreshold_prop.rvalue() << RTT::endlog();
46-
return false;
47-
}
48-
if (appender) appender->setThreshold(priority);
49-
return true;
35+
log4cpp::Priority::Value priority = log4cpp::Priority::NOTSET;
36+
try
37+
{
38+
priority = log4cpp::Priority::getPriorityValue( boost::to_upper_copy( priorityThreshold_prop.rvalue() ) );
39+
}
40+
catch (std::invalid_argument)
41+
{
42+
// \todo more descriptive
43+
RTT::Logger::In in(getName());
44+
RTT::log(RTT::Error) << "Bad log4cpp priority: " << priorityThreshold_prop.rvalue() << RTT::endlog();
45+
return false;
46+
}
47+
if (appender) appender->setThreshold(priority);
48+
return true;
5049
}
5150

5251
bool Appender::configureLayout()
@@ -94,7 +93,7 @@ bool Appender::startHook()
9493
/// \todo input ports must be connected?
9594
// return log_port.ready();
9695
//
97-
configureThreshold();
96+
configureThreshold();
9897

9998
return true;
10099
}

logging/Appender.hpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ class Appender : public RTT::TaskContext
2525
successfully, otherwise false
2626
*/
2727
virtual bool configureLayout();
28+
2829
/** Set appender priority threshold.
2930
*/
30-
bool configureThreshold();
31+
bool configureThreshold();
32+
3133
/// ensure port is connected before we start
3234
virtual bool startHook();
3335
/// Drain the buffer

0 commit comments

Comments
 (0)