diff options
Diffstat (limited to 'captain/log.f90')
-rw-r--r-- | captain/log.f90 | 34 |
1 files changed, 34 insertions, 0 deletions
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 |