log_header Subroutine

public subroutine log_header(message, level, upper_space, lower_space)

Send a log header message to the log file

Log levels: DEBUG, INFO, WARNING and ERROR

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: message

Message to log

integer, intent(in) :: level

Log level

logical, intent(in), optional :: upper_space
logical, intent(in), optional :: lower_space

Calls

proc~~log_header~~CallsGraph proc~log_header log_header proc~log_message log_message proc~log_header->proc~log_message proc~write_log write_log proc~log_message->proc~write_log

Source Code

    subroutine log_header(message, level, upper_space, lower_space)
        !! Send a log header message to the log file
        !!
        !! Log levels: DEBUG, INFO, WARNING and ERROR        
        character(len=*), intent(in) :: message !! Message to log
        integer, intent(in) :: level !! Log level
        logical, intent(in), optional :: upper_space, lower_space

        ! Local variables
        logical :: u_space, l_space

        if (present(upper_space)) then
            u_space = upper_space
        else
            u_space = .true.
        end if

        if (present(lower_space)) then
            l_space = lower_space
        else
            l_space = .true.
        end if
        
        if (u_space) call log_message("", level)
        call log_message("================================================================", level)
        call log_message(message, level)
        call log_message("================================================================", level)
        if (l_space) call log_message("", level)
    end subroutine log_header