+ it {
+ should contain_file_line('direct').with(
+ 'path' => '/opt/opendaylight/etc/org.ops4j.pax.logging.cfg',
+ 'line' => 'log4j2.appender.console.direct = true',
+ 'after' => 'karaf.log.console=INFO',
+ 'match' => '^log4j2.appender.console.direct.*$'
+ )
+ }
+ else
+
+ it {
+ should contain_file_line('logmaxsize').with(
+ 'path' => '/opt/opendaylight/etc/org.ops4j.pax.logging.cfg',
+ 'line' => "log4j2.appender.rolling.policies.size.size = #{log_max_size}",
+ 'match' => '^log4j2.appender.rolling.policies.size.size.*$',
+ )
+ }
+ it {
+ should contain_file_line('rolloverstrategy').with(
+ 'path' => '/opt/opendaylight/etc/org.ops4j.pax.logging.cfg',
+ 'line' => 'log4j2.appender.rolling.strategy.type = DefaultRolloverStrategy'
+ )
+ }
+ it {
+ should contain_file_line('logmaxrollover').with(
+ 'path' => '/opt/opendaylight/etc/org.ops4j.pax.logging.cfg',
+ 'line' => "log4j2.appender.rolling.strategy.max = #{log_max_rollover}",
+ 'match' => '^log4j2.appender.rolling.strategy.max.*$',
+ )
+ }
+ it {
+ should contain_file_line('logrolloverfileindex').with(
+ 'path' => '/opt/opendaylight/etc/org.ops4j.pax.logging.cfg',
+ 'line' => "log4j2.appender.rolling.strategy.fileIndex = #{log_rollover_fileindex}",
+ 'match' => '^log4j2.appender.rolling.strategy.fileIndex.*$',
+ )
+ }
+ end
+ it {
+ should contain_file_line('logpattern').with(
+ 'path' => '/opt/opendaylight/etc/org.ops4j.pax.logging.cfg',
+ 'line' => "log4j2.pattern = #{log_pattern}",
+ 'match' => '^log4j2.pattern.*$',
+ )
+ }
+ if enable_paxosgi_logger == true
+ presence = 'present'