Skip to content

Issue with logger s configuration subroutine #252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/specs/stdlib_logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ Pure subroutine
`log_units` (optional): shall be a rank one allocatable array
variable of type default integer. It is an `intent(out)`
argument. On return it shall be the elements of the `self`'s `log_units`
array.
array. If there were no elements in `self`'s `log_units`, a
zero-sized array is returned.

#### Example

Expand Down
6 changes: 5 additions & 1 deletion src/stdlib_logger.f90
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,11 @@ pure subroutine configuration( self, add_blank_line, indent, &
if ( present(indent) ) indent = self % indent_lines
if ( present(max_width) ) max_width = self % max_width
if ( present(time_stamp) ) time_stamp = self % time_stamp
if ( present(log_units) ) log_units = self % log_units(1:self % units)
if ( present(log_units) .and. self % units .gt. 0 ) then
log_units = self % log_units(1:self % units)
else
allocate(log_units(0))
end if

end subroutine configuration

Expand Down