tem_reportStatus Subroutine

public subroutine tem_reportStatus(level, text, debug, string)

print an array to the debugunit

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: level

level for debug output

character(len=*) :: text

Array title in debug output for easy identification in the file

type(tem_debug_type), intent(in), optional :: debug

optional debug type

character(len=*), optional :: string

optional additional string extending the title


Calls

proc~~tem_reportstatus~~CallsGraph proc~tem_reportstatus tem_reportStatus interface~tem_logging_isactive tem_logging_isActive proc~tem_reportstatus->interface~tem_logging_isactive proc~my_status_string my_status_string proc~tem_reportstatus->proc~my_status_string proc~tem_logging_isactive_for tem_logging_isActive_for interface~tem_logging_isactive->proc~tem_logging_isactive_for proc~tem_logging_isactive_primary tem_logging_isActive_primary interface~tem_logging_isactive->proc~tem_logging_isactive_primary proc~print_self_status print_self_status proc~my_status_string->proc~print_self_status proc~newunit newunit proc~my_status_string->proc~newunit proc~print_self_status->proc~newunit

Contents

Source Code


Source Code

  subroutine tem_reportStatus( level, text, debug, string )
    ! ---------------------------------------------------------------------------
    !> level for debug output
    integer, intent(in) :: level
    !> Array title in debug output for easy identification in the file
    character( len=* ) :: text
    !> optional debug type
    type(tem_debug_type), optional, intent(in) :: debug
    !> optional additional string extending the title
    character( len=* ), optional :: string
    ! ---------------------------------------------------------------------------
    character( len=labelLen ) :: traceString
    character(len=labelLen) :: stat_str
    integer :: nUnit
    logical :: isActive
    ! ---------------------------------------------------------------------------
    if( present( debug ))then
      nUnit = debug%logger%funit(level)
      isActive = tem_logging_isActive( debug%logger, level )
    else
      nUnit = main_debug%logger%funit(level)
      isActive = tem_logging_isActive( main_debug%logger, level )
    end if

    if( present ( string )) then
      traceString = string
    else
      traceString = 'VmHWM'
    endif

    if( isActive ) then
      stat_str = my_status_string(trim(traceString))
      write(nUnit,*) trim(stat_str), '  ',  trim(text)
    end if

  end subroutine tem_reportStatus