Mercurial > repos > yating-l > hubarchivecreatortest
annotate util/Filters.py @ 2:7486909dfc22 draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
| author | yating-l |
|---|---|
| date | Fri, 29 Sep 2017 14:50:50 -0400 |
| parents | 85195e0d4b71 |
| children |
| rev | line source |
|---|---|
|
1
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
1 import logging |
|
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
2 |
|
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
3 class TraceBackFormatter(logging.Formatter): |
|
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
4 def format(self, record): |
|
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
5 # If the log has some Exception text, we don't display them |
|
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
6 s = super(TraceBackFormatter, self).format(record) |
|
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
7 if record.exc_text or record.exc_info: |
|
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
8 s = record.message |
|
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
9 return s |
|
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
10 |
|
85195e0d4b71
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit b1ae7349f118a0fe7923d765020dfc684cf84116-dirty
yating-l
parents:
diff
changeset
|
11 |
