From fd9077056f7f33c60b218636ead0644d42e75a09 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Sat, 27 Mar 2021 16:50:20 -0400 Subject: Minor cleanup of the template code. Started on main program handling requests. --- captain/log.f90 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 captain/log.f90 (limited to 'captain/log.f90') diff --git a/captain/log.f90 b/captain/log.f90 new file mode 100644 index 0000000..3757faf --- /dev/null +++ b/captain/log.f90 @@ -0,0 +1,34 @@ +module logging +implicit none + + integer::logunit + +contains + + subroutine initialize(filename) + implicit none + + character(*), intent(in)::filename + open(newunit=logunit, file=trim(filename), action="write", status="unknown", position="append") + + end subroutine initialize + + subroutine shutdown() + implicit none + + close(logunit) + + end subroutine shutdown + + subroutine write_log(string) + implicit none + + character(*), intent(in)::string + + ! GNU Extension... :( + write(logunit, *) fdate()//" :: "//string + call flush(logunit) + + end subroutine write_log + +end module logging \ No newline at end of file -- cgit v1.2.3