Logging
https://gist.github.com/chengdi123000/42ec8ed2cbef09ee050766c2f25498cb#file-mpifilehandler-py Created on Wed Feb 14 16:17:38 2018 This handler is used to deal with logging with mpi4py in Python3.
@author: cheng
@reference: https://cvw.cac.cornell.edu/python/logging https://groups.google.com/forum/#!topic/mpi4py/SaNzc8bdj6U https://gist.github.com/JohnCEarls/8172807
MPIFileHandler
Bases: FileHandler
Source code in june/logging.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
close()
Source code in june/logging.py
78 79 80 81 82 83 |
|
emit(record)
Emit a record.
If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If
Parameters:
Name | Type | Description | Default |
---|---|---|---|
record
|
|
required |
Raises:
Type | Description |
---|---|
print_exception
|
and appended to the stream |
has
|
an |
output
|
to the stream |
Modification
|
|
stream
|
is MPI |
than
|
write |
bytestring
|
so |
only
|
once in each all of this emit function to keep atomicity |
Source code in june/logging.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|