Initalises the master logging object. This subroutine must be called before the master logger is used. It should only be called once.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | logfile | Name of the log-file to which output will be written |
||
integer, | intent(in), | optional | :: | stderr_threshold | Threshold priority, at and above which messages will be
written to standard error. Defaults to |
|
integer, | intent(in), | optional | :: | stdout_threshold | Threshold priority, at and above which messages will be
written to standard out. Defaults to |
|
integer, | intent(in), | optional | :: | logfile_threshold | Threshold priority, at and above which messages will be
written to the log file. Defaults to |
subroutine logger_init(logfile, stderr_threshold, stdout_threshold, &
logfile_threshold)
!* Author: Chris MacMackin
! Date: December 2016
!
! Initalises the master logging object. This subroutine must be
! called before the master logger is used. It should only be
! called once.
!
character(len=*), intent(in) :: logfile
!! Name of the log-file to which output will be written
integer, intent(in), optional :: stderr_threshold
!! Threshold priority, at and above which messages will be
!! written to standard error. Defaults to `error`.
integer, intent(in), optional :: stdout_threshold
!! Threshold priority, at and above which messages will be
!! written to standard out. Defaults to `info`.
integer, intent(in), optional :: logfile_threshold
!! Threshold priority, at and above which messages will be
!! written to the log file. Defaults to `trivia`.
master_logger = logger(logfile, stderr_threshold, stdout_threshold, &
logfile_threshold)
end subroutine logger_init