Skip to content

Commit a220e5b

Browse files
committed
level_logger: progress
1 parent 478fe70 commit a220e5b

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

src/tests/logger/test_stdlib_logger.f90

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ program test_stdlib_logger
1212
implicit none
1313

1414
integer, allocatable :: log_units(:)
15-
integer :: max_width, stat
15+
integer :: level, max_width, stat
1616
integer :: unit1, unit2, unit3, unit4, unit5, unit6
1717
logical :: add_blank_line, exist, indent, time_stamp
1818

@@ -71,6 +71,7 @@ program test_stdlib_logger
7171
caret = '^', &
7272
stat = stat )
7373

74+
call test_level()
7475

7576
contains
7677

@@ -649,4 +650,33 @@ subroutine test_adding_log_units()
649650
return
650651
end subroutine test_adding_log_units
651652

653+
subroutine test_level()
654+
655+
print *, 'running test_level'
656+
657+
call global % configure( level = stdlib_none_level )
658+
659+
call global % configuration( level = level )
660+
661+
if ( level == stdlib_none_level ) then
662+
write(*,*) 'LEVEL is none as expected.'
663+
664+
else
665+
error stop 'LEVEL starts off as not equal to none contrary ' // &
666+
'to expectations.'
667+
668+
end if
669+
670+
call global % log_message('log_message printed')
671+
672+
call global % log_debug( 'This message should not be printed')
673+
call global % log_information( 'This message should not be printed')
674+
call global % log_error( 'This message should not be printed')
675+
call global % log_io_error( 'This message should not be printed')
676+
677+
678+
679+
680+
end subroutine test_level
681+
652682
end program test_stdlib_logger

0 commit comments

Comments
 (0)