Skip to content
Snippets Groups Projects
Commit 3a3bee1b authored by Botond Baranyi's avatar Botond Baranyi Committed by Adam Knapp
Browse files

Added a new way of removing logging bits in the config file (#740)

parent 277f95ed
No related branches found
No related tags found
1 merge request!482Added a new way of removing logging bits in the config file (#740)
......@@ -32,6 +32,16 @@ void Logging_Bits::merge( const Logging_Bits & other )
}
}
void Logging_Bits::remove_bits( const Logging_Bits & other )
{
for( size_t i = 0; i < TTCN_Logger::NUMBER_OF_LOGSEVERITIES; ++i )
{
if (other.bits[i]) {
bits[i] = FALSE;
}
}
}
void Logging_Bits::add_sev( TTCN_Logger::Severity sev )
{
assert(sev >= 0);
......
......@@ -79,6 +79,12 @@ struct Logging_Bits
*/
void merge ( const Logging_Bits & other );
/** @brief Substitute given Logging_Bits from this one
@param other Logging_Bits
*/
void remove_bits ( const Logging_Bits & other );
/** @brief Return a string corresponding to the bits set in this object.
@return an \c expstring_t containing a textual description.
......
......@@ -1840,6 +1840,11 @@ LoggingBitmask:
{
$$ = $1;
$$.merge($3);
}
| LoggingBitmask '|' '!' LoggingBitOrCollection
{
$$ = $1;
$$.remove_bits($4);
}
;
......
......@@ -684,6 +684,7 @@ ListOp:
LoggingBitorCollection:
LoggingBit
| '!' LoggingBit
| LoggingBitCollection
;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment