@@ -69,13 +69,20 @@ module stdlib_logger
69
69
write_failure = 8
70
70
71
71
integer , parameter , public :: &
72
+ stdlib_all_level = 0 , &
72
73
stdlib_debug_level = 10 , &
73
74
stdlib_information_level = 20 , &
74
75
stdlib_warning_level = 30 , &
75
76
stdlib_error_level = 40 , &
76
77
stdlib_io_error_level = 40 , &
77
- stdlib_text_error_level = 40
78
-
78
+ stdlib_text_error_level = 40 , &
79
+ stdlib_none_level = 10 + max ( &
80
+ stdlib_debug_level, &
81
+ stdlib_information_level, &
82
+ stdlib_warning_level, &
83
+ stdlib_error_level, &
84
+ stdlib_io_error_level, &
85
+ stdlib_text_error_level)
79
86
80
87
character (* ), parameter :: module_name = ' stdlib_logger'
81
88
@@ -389,7 +396,7 @@ end subroutine validate_unit
389
396
end subroutine add_log_unit
390
397
391
398
392
- pure subroutine configuration ( self , add_blank_line , indent , &
399
+ pure subroutine configuration ( self , add_blank_line , indent , level , &
393
400
max_width , time_stamp , log_units )
394
401
! ! version: experimental
395
402
@@ -399,12 +406,13 @@ pure subroutine configuration( self, add_blank_line, indent, &
399
406
! ! starts with a blank line, and `.false.` implying no blank line.
400
407
! ! 2. `indent` is a logical flag with `.true.` implying that subsequent columns
401
408
! ! will be indented 4 spaces and `.false.` implying no indentation.
402
- ! ! 3. `max_width` is the maximum number of columns of output text with
409
+ ! ! 3. `level` is the lowest level for printing a message
410
+ ! ! 4. `max_width` is the maximum number of columns of output text with
403
411
! ! `max_width` == 0 => no bounds on output width.
404
- ! ! 4 . `time_stamp` is a logical flag with `.true.` implying that the output
412
+ ! ! 5 . `time_stamp` is a logical flag with `.true.` implying that the output
405
413
! ! will have a time stamp, and `.false.` implying that there will be no
406
414
! ! time stamp.
407
- ! ! 5 . `log_units` is an array of the I/O unit numbers to which log output
415
+ ! ! 6 . `log_units` is an array of the I/O unit numbers to which log output
408
416
! ! will be written.
409
417
! !([Specification](../page/specs/stdlib_logger.html#configuration-report-a-loggers-configuration))
410
418
@@ -414,6 +422,8 @@ pure subroutine configuration( self, add_blank_line, indent, &
414
422
! ! A logical flag to add a preceding blank line
415
423
logical , intent (out ), optional :: indent
416
424
! ! A logical flag to indent subsequent lines
425
+ integer , intent (out ), optional :: level
426
+ ! ! The mimimum level for printing a message
417
427
integer , intent (out ), optional :: max_width
418
428
! ! The maximum number of columns for most outputs
419
429
logical , intent (out ), optional :: time_stamp
@@ -444,6 +454,7 @@ pure subroutine configuration( self, add_blank_line, indent, &
444
454
445
455
if ( present (add_blank_line) ) add_blank_line = self % add_blank_line
446
456
if ( present (indent) ) indent = self % indent_lines
457
+ if ( present (level) ) level = self % level
447
458
if ( present (max_width) ) max_width = self % max_width
448
459
if ( present (time_stamp) ) time_stamp = self % time_stamp
449
460
if ( present (log_units) .and. self % units .gt. 0 ) then
@@ -455,7 +466,7 @@ pure subroutine configuration( self, add_blank_line, indent, &
455
466
end subroutine configuration
456
467
457
468
458
- pure subroutine configure ( self , add_blank_line , indent , max_width , &
469
+ pure subroutine configure ( self , add_blank_line , indent , level , max_width , &
459
470
time_stamp )
460
471
! ! version: experimental
461
472
@@ -467,10 +478,11 @@ pure subroutine configure( self, add_blank_line, indent, max_width, &
467
478
! ! 2. `indent` is a logical flag with `.true.` implying that subsequent lines
468
479
! ! will be indented 4 spaces and `.false.` implying no indentation. `indent`
469
480
! ! has a startup value of `.true.`.
470
- ! ! 3. `max_width` is the maximum number of columns of output text with
481
+ ! ! 3. `level` is the lowest level for printing a message
482
+ ! ! 4. `max_width` is the maximum number of columns of output text with
471
483
! ! `max_width == 0` => no bounds on output width. `max_width` has a startup
472
484
! ! value of 0.
473
- ! ! 4 . `time_stamp` is a logical flag with `.true.` implying that the output
485
+ ! ! 5 . `time_stamp` is a logical flag with `.true.` implying that the output
474
486
! ! will have a time stamp, and `.false.` implying that there will be no
475
487
! ! time stamp. `time_stamp` has a startup value of `.true.`.
476
488
! !([Specification](../page/specs/stdlib_logger.html#configure-configure-the-logging-process))
@@ -485,10 +497,12 @@ pure subroutine configure( self, add_blank_line, indent, max_width, &
485
497
class(logger_type), intent (inout ) :: self
486
498
logical , intent (in ), optional :: add_blank_line
487
499
logical , intent (in ), optional :: indent
500
+ integer , intent (in ), optional :: level
488
501
integer , intent (in ), optional :: max_width
489
502
logical , intent (in ), optional :: time_stamp
490
503
491
504
if ( present (add_blank_line) ) self % add_blank_line = add_blank_line
505
+ if ( present (level) ) self % level = level
492
506
if ( present (indent) ) self % indent_lines = indent
493
507
if ( present (max_width) ) then
494
508
if ( max_width <= 4 ) then
0 commit comments