Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-commons
Commits
098455c6
Commit
098455c6
authored
Nov 10, 2022
by
Wei Shoulin
Browse files
bug
parent
c5994650
Changes
2
Hide whitespace changes
Inline
Side-by-side
csst_dfs_commons/logging/setup.py
View file @
098455c6
...
...
@@ -24,7 +24,7 @@ def setup_logging():
ch
.
setFormatter
(
cfmt
)
# File handler
fh
=
logging
.
handlers
.
RotatingFileHandler
(
'csst.log'
,
fh
=
logging
.
handlers
.
RotatingFileHandler
(
'
logs/
csst.log'
,
maxBytes
=
10
*
1024
*
1024
,
backupCount
=
10
)
fh
.
setLevel
(
logging
.
INFO
)
fh
.
setFormatter
(
ffmt
)
...
...
@@ -58,7 +58,7 @@ def setup_test_logging():
ch
.
setFormatter
(
cfmt
)
# Outputs DEBUG level logging to file
fh
=
logging
.
FileHandler
(
'csst-test.log'
)
fh
=
logging
.
FileHandler
(
'
logs/
csst-test.log'
)
fh
.
setLevel
(
logging
.
DEBUG
)
fh
.
setFormatter
(
ffmt
)
...
...
csst_dfs_commons/models/common.py
View file @
098455c6
...
...
@@ -38,7 +38,8 @@ class BaseModel:
return
None
for
k
in
self
.
__dataclass_fields__
.
keys
():
if
k
==
'header'
:
self
.
__setattr__
(
k
,
json
.
loads
(
record
.
__getattribute__
(
k
)))
if
record
.
__getattribute__
(
k
):
self
.
__setattr__
(
k
,
json
.
loads
(
record
.
__getattribute__
(
k
)))
else
:
self
.
__setattr__
(
k
,
record
.
__getattribute__
(
k
))
return
self
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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