Initialize the primary logger (default to stdout instead of null device).
Type | Intent | Optional | 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' |
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