Load logging configuration from a Lua table and return the initialized logger.
The table provided via the thandle has to contain all settings to describe the logging object. For all settings there are defaults, and the routine will silently assume those in case of failing to read a setting for any reason.
For the primary logger only level is mandatory, filename, real_form and int_form are also used but optional. In contrast to other logging facilities, the primary logging defaults to stdout and not to the null device.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | conf | ||||
integer, | intent(in) | :: | thandle | |||
integer, | intent(in) | :: | rank | |||
type(tem_logging_type), | intent(out), | optional | :: | me |
subroutine tem_logging_load( conf, thandle, rank, me ) ! --------------------------------------------------------------------------- !> type(flu_State) :: conf !> integer, intent(in) :: thandle !> integer, intent(in) :: rank !> type(tem_logging_type), optional, intent(out) :: me ! --------------------------------------------------------------------------- integer :: level character(len=pathLen) :: filename logical :: root_only character(len=form_len) :: real_form character(len=form_len) :: int_form integer :: iError ! --------------------------------------------------------------------------- call aot_get_val( level, ErrCode = iError, & & L = conf, thandle = thandle, key = 'level', & & default = 1 ) call aot_get_val( filename, ErrCode = iError, & & L = conf, thandle = thandle, key = 'filename', & & default = '' ) call aot_get_val( root_only, ErrCode = iError, & & L = conf, thandle = thandle, key = 'root_only', & & default = .true. ) call aot_get_val( real_form, ErrCode = iError, & & L = conf, thandle = thandle, key = 'real_form', & & default = 'EN12.3' ) call aot_get_val( int_form, ErrCode = iError, & & L = conf, thandle = thandle, key = 'int_form', & & default = 'I0' ) if (present(me)) then call tem_logging_init_logger( me = me, & & level = level, & & rank = rank, & & filename = filename, & & root_only = root_only, & & real_form = real_form, & & int_form = int_form ) else call tem_logging_init_primary( level = level, & & rank = rank, & & root_only = root_only, & & filename = filename, & & real_form = real_form, & & int_form = int_form ) end if end subroutine tem_logging_load