ESMF_LogInitialize Subroutine

public subroutine ESMF_LogInitialize(filename, logappendflag, logkindflag, rc)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
logical, intent(in), optional :: logappendflag
type(ESMF_LogKind_Flag), intent(in), optional :: logkindflag
integer, intent(out), optional :: rc

Source Code

      subroutine ESMF_LogInitialize(filename, logappendflag, logkindflag, rc)
!
! !ARGUMENTS:
      character(len=*),        intent(in)           :: filename
      logical,                 intent(in), optional :: logappendflag
      type(ESMF_LogKind_Flag), intent(in), optional :: logkindflag
      integer,                 intent(out),optional :: rc

! !DESCRIPTION:
!      This routine initializes the global default {\tt ESMF\_Log}.
!      The default {\tt ESMF\_Log} is assigned the {\tt filename} and
!      is associated with an open Fortran unit number.
!
!      The arguments are:
!      \begin{description}
!
!      \item [filename]
!            Name of file.  Maximum length 58 characters to allow for
!            the PET number to be added and keep the total file name
!            length under 64 characters.
!     \item [{[logappendflag]}]
!           If the log file already exists, a value of {\tt .false.}
!           will set the file position to the beginning of the file.  A value
!           of [\tt .true.} sets the position to the end of the file.
!           If not specified, defaults to {\tt .true.}.
!      \item [{[logkindflag]}]
!            Specifies {\tt ESMF\_LOGKIND\_SINGLE}, {\tt ESMF\_LOGKIND\_MULTI} or
!            {\tt ESMF\_LOGKIND\_NONE}.
!      \item [{[rc]}]
!            Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!      \end{description}
!
!EOPI
    ! Initialize return code; assume routine not implemented
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    call ESMF_LogOpen(ESMF_LogDefault, filename,  &
        appendflag=logappendflag, logkindflag=logkindflag, rc=rc)

end subroutine ESMF_LogInitialize