aboutsummaryrefslogtreecommitdiff
path: root/captain/log.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-03-27 16:50:20 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-03-27 16:50:20 -0400
commitfd9077056f7f33c60b218636ead0644d42e75a09 (patch)
tree9010b2d5ed8d22fa1e571cdec79f8a6f0c30d66c /captain/log.f90
parent0b8ec300ca4f2f2c3ce09d14ac1eed5478ea6420 (diff)
downloadlevitating-fd9077056f7f33c60b218636ead0644d42e75a09.tar.gz
levitating-fd9077056f7f33c60b218636ead0644d42e75a09.zip
Minor cleanup of the template code. Started on main program handling requests.
Diffstat (limited to 'captain/log.f90')
-rw-r--r--captain/log.f9034
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