-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add logging capability for easier debugging (#680)
* adding logging capability * adding logging * more logging * more logging * more logging * more logging * more logging * more documentation * changed cache key
- Loading branch information
1 parent
dcae6b4
commit 8db6654
Showing
6 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
!> @file | ||
!> @brief Logging for the g2 library. | ||
!> @author Edward Hartnett @date 5/15/24 | ||
|
||
!> @brief Logging for the g2 library. | ||
!> | ||
!> Set g2_log_level to turn on logging. | ||
!> | ||
!> @author Edward Hartnett @date 5/15/24 | ||
module g2logging | ||
integer g2_log_level !< 0 for no logging. | ||
character* 120 g2_log_msg !< Fill this with the logging message. | ||
|
||
contains | ||
!> Print a debug message for the g2 library. | ||
!> | ||
!> @param[in] level If this is lower or equal to the current setting | ||
!> of g2_log_level, print this log message. | ||
!> | ||
!> @author Edward Hartnett @date 5/15/24 | ||
subroutine g2_log(level) | ||
integer, intent(in) :: level | ||
|
||
if (level .le. g2_log_level) then | ||
print *, g2_log_msg | ||
endif | ||
end subroutine g2_log | ||
end module g2logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters