Skip to content

Commit 96ec490

Browse files
committed
✏️ add generated file header and project links on file header
1 parent 974b692 commit 96ec490

5 files changed

Lines changed: 19 additions & 2 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@
3636

3737
# vscode settings directory
3838
**/.vscode
39+
40+
# generated files
41+
**/logfile.txt

src/ansi_styling.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
! "Flogger" is simple and fast logging library for Modern Fortran applications.
2+
! https://github.com/arifyunando/flogger
23
!
34
! MIT License
45
!

src/flogger.f90

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
! "Flogger" is simple and fast logging library for Modern Fortran applications.
2+
! https://github.com/arifyunando/flogger
23
!
34
! MIT License
45
!
@@ -95,10 +96,20 @@ subroutine SET_FLOGGER_OPTIONS(Level, UseEncoding, ConsolePrint, FileOutput)
9596
if ( FileOutput ) then
9697
open(Unit=FLOGS_FILE_UNIT, File=FLOGS_FILE_NAME, &
9798
Status=FLOGS_FILE_STAT, Action=FLOGS_FILE_ACTS)
99+
write(FLOGS_FILE_UNIT, 200)
100+
write(FLOGS_FILE_UNIT, 210) "LOGFILES GENERATED BY FLOGGER"
101+
write(FLOGS_FILE_UNIT, 220) getTimeDate(UseEncoding=.false.)
102+
write(FLOGS_FILE_UNIT, 200)
103+
write(FLOGS_FILE_UNIT, *)
98104
else
99105
close(Unit=FLOGS_FILE_UNIT)
100106
end if
101107
end if
108+
109+
210 format (30X, A29, 30X)
110+
220 format (32X, A25, 32X)
111+
200 format ("=========================================================================================")
112+
!--- formatters
102113
end subroutine SET_FLOGGER_OPTIONS
103114

104115
!--- Object-Methods / Object-Procedures

src/flogger_test.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
! "Flogger" is simple and fast logging library for Modern Fortran applications.
2+
! https://github.com/arifyunando/flogger
23
!
34
! MIT License
45
!
@@ -155,7 +156,7 @@ subroutine levelClassificationTest()
155156
call SET_FLOGGER_OPTIONS(FileOutput=.false.)
156157

157158
print*, "SET TO SILENT"
158-
call SET_FLOGGER_OPTIONS(Level=FLOGS_SET_SILENT, useEncoding=.true.)
159+
call SET_FLOGGER_OPTIONS(Level=FLOGS_SET_SILENT)
159160

160161
call middleWarning()
161162
call middleNotice()

src/formatter.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
! "Flogger" is simple and fast logging library for Modern Fortran applications.
2+
! https://github.com/arifyunando/flogger
23
!
34
! MIT License
45
!
@@ -47,8 +48,8 @@ module FloggerFormatter
4748

4849
function getTimeDate(options, useEncoding) result(out)
4950
implicit none
50-
character(*), optional, intent(in) :: options(:)
5151
character(:), allocatable :: out
52+
character(*), optional, intent(in) :: options(:)
5253
logical, optional :: useEncoding
5354

5455
!--- local variables

0 commit comments

Comments
 (0)