tem_logging_init_primary Subroutine

public subroutine tem_logging_init_primary(level, rank, filename, root_only, real_form, int_form)

Initialize the primary logger (default to stdout instead of null device).

Arguments

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

Level of output to log with this logger

integer, intent(in) :: rank

Rank of the process executing the initialization.

character(len=*), intent(in), optional :: filename

File to write output to, default is standard out.

To send messages to the stdout set this parameter to '/stdout:'.

logical, intent(in), optional :: root_only

Indication whether only root should print log messages.

character(len=*), intent(in), optional :: real_form

Format to write real numbers. Default is 'EN12.3'

character(len=*), intent(in), optional :: int_form

Format to write integer numbers. Default is 'I0'


Calls

proc~~tem_logging_init_primary~~CallsGraph proc~tem_logging_init_primary tem_logging_init_primary proc~tem_logging_init_logger tem_logging_init_logger proc~tem_logging_init_primary->proc~tem_logging_init_logger proc~newunit newunit proc~tem_logging_init_logger->proc~newunit proc~tem_connect_tonull tem_connect_toNull proc~tem_logging_init_logger->proc~tem_connect_tonull proc~tem_connect_tonull->proc~newunit

Called by

proc~~tem_logging_init_primary~~CalledByGraph proc~tem_logging_init_primary tem_logging_init_primary interface~tem_logging_init tem_logging_init interface~tem_logging_init->proc~tem_logging_init_primary proc~tem_logging_load tem_logging_load proc~tem_logging_load->proc~tem_logging_init_primary proc~tem_logging_load_primary tem_logging_load_primary proc~tem_logging_load_primary->proc~tem_logging_init_primary proc~tem_logging_load_primary->proc~tem_logging_load proc~tem_load_debug tem_load_debug proc~tem_load_debug->interface~tem_logging_init proc~tem_load_debug->proc~tem_logging_load proc~tem_debug_load_main tem_debug_load_main proc~tem_debug_load_main->proc~tem_load_debug

Source Code

  subroutine tem_logging_init_primary( level, rank, filename, &
    &                                  root_only,             &
    &                                  real_form, int_form    )
    ! ---------------------------------------------------------------------------
    !> Level of output to log with this logger
    integer, intent(in) :: level
    !> Rank of the process executing the initialization.
    integer, intent(in) :: rank

    !> Indication whether only root should print log messages.
    logical, optional, intent(in) :: root_only

    !> File to write output to, default is standard out.
    !!
    !! To send messages to the stdout set this parameter to
    !! '/stdout:'.
    character(len=*), optional, intent(in) :: filename

    !> Format to write real numbers.
    !! Default is 'EN12.3'
    character(len=*), optional, intent(in) :: real_form

    !> Format to write integer numbers.
    !! Default is 'I0'
    character(len=*), optional, intent(in) :: int_form
    ! ---------------------------------------------------------------------------
    character(len=PathLen) :: fname
    ! ---------------------------------------------------------------------------

    if (present(filename)) then
      if (trim(filename) == '') then
        fname = '/stdout:'
      else
        fname = adjustl(filename)
      end if
    else
      fname = '/stdout:'
    end if

    call tem_logging_init_logger( me        = primary,     &
      &                           level     = level,       &
      &                           rank      = rank,        &
      &                           root_only = root_only,   &
      &                           filename  = trim(fname), &
      &                           real_form = real_form,   &
      &                           int_form  = int_form     )

    ! Set the shorthand module variable for the primary file units:
    logUnit = primary%funit

  end subroutine tem_logging_init_primary