Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
PORTER Edward
GWHMC
Commits
4982193a
Commit
4982193a
authored
Apr 08, 2021
by
Marc Arene
Browse files
Printing the date of the run in the logger file.
parent
75832658
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Codes/main.py
Codes/main.py
+4
-0
No files found.
Codes/main.py
View file @
4982193a
...
...
@@ -7,6 +7,7 @@ sys.path.append('../')
import
os
import
numpy
as
np
import
time
import
datetime
from
optparse
import
OptionParser
from
configparser
import
ConfigParser
import
subprocess
...
...
@@ -113,6 +114,9 @@ if __name__ == '__main__':
outdir
=
opts
.
outdir
cut
.
setup_logger
(
cut
.
logger
,
outdir
=
outdir
,
label
=
'logger'
,
log_level
=
'INFO'
)
today
=
datetime
.
datetime
.
today
()
today_fmt
=
'{:%d/%m/%y at %Hh%M}'
.
format
(
today
)
cut
.
logger
.
info
(
f
'
\n\n\n\n\n
Today is the
{
today_fmt
}
.'
)
cut
.
logger
.
info
(
f
'Output directory is:
{
outdir
}
'
)
# cut.logger.info(f'Run `$ tail -f {outdir}logger.log` to follow the run')
# import IPython; IPython.embed(); sys.exit()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment