@@ -12,7 +12,7 @@ program test_stdlib_logger
12
12
implicit none
13
13
14
14
integer , allocatable :: log_units(:)
15
- integer :: max_width, stat
15
+ integer :: level, max_width, stat
16
16
integer :: unit1, unit2, unit3, unit4, unit5, unit6
17
17
logical :: add_blank_line, exist, indent, time_stamp
18
18
@@ -71,6 +71,7 @@ program test_stdlib_logger
71
71
caret = ' ^' , &
72
72
stat = stat )
73
73
74
+ call test_level()
74
75
75
76
contains
76
77
@@ -649,4 +650,33 @@ subroutine test_adding_log_units()
649
650
return
650
651
end subroutine test_adding_log_units
651
652
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
+
652
682
end program test_stdlib_logger
0 commit comments