File tree Expand file tree Collapse file tree 3 files changed +39
-2
lines changed Expand file tree Collapse file tree 3 files changed +39
-2
lines changed Original file line number Diff line number Diff line change
1
+ import logging .config
2
+
3
+ LOG_CONFIG = {
4
+ 'version' : 1 ,
5
+ 'disable_existing_loggers' : True ,
6
+ 'propagate' : True ,
7
+ 'formatters' : {
8
+ 'default' : {
9
+ 'format' : '%(asctime)s - %(module)s - %(levelname)s - %(message)s' ,
10
+ 'datefmt' : '%Y-%m-%d %H:%M:%S' ,
11
+ },
12
+ },
13
+ 'handlers' : {
14
+ 'default' : {
15
+ 'formatter' : 'default' ,
16
+ 'class' : 'logging.StreamHandler' ,
17
+ },
18
+ },
19
+ 'loggers' : {
20
+ '' : {
21
+ 'level' : 'INFO' ,
22
+ 'handlers' : ['default' ],
23
+ 'propagate' : True ,
24
+ },
25
+ },
26
+ }
27
+
28
+ _CONFIGURED = False
29
+
30
+ def get_logger (name : str ):
31
+ global _CONFIGURED # noqa: PLW0603
32
+ if not _CONFIGURED :
33
+ logging .config .dictConfig (LOG_CONFIG )
34
+ _CONFIGURED = True
35
+ return logging .getLogger (name )
Original file line number Diff line number Diff line change 3
3
4
4
import hail as hl
5
5
6
+ from v03_pipeline .lib .logger import get_logger
6
7
from v03_pipeline .lib .model import (
7
8
DatasetType ,
8
9
ReferenceDatasetCollection ,
16
17
parse_dataset_version ,
17
18
)
18
19
19
- logger = logging . getLogger (__name__ )
20
+ logger = get_logger (__name__ )
20
21
21
22
22
23
@dataclasses .dataclass
Original file line number Diff line number Diff line change 3
3
import hail as hl
4
4
import luigi
5
5
6
+ from v03_pipeline .lib .logger import get_logger
6
7
from v03_pipeline .lib .model import ReferenceDatasetCollection
7
8
from v03_pipeline .lib .paths import valid_reference_dataset_collection_path
8
9
from v03_pipeline .lib .reference_data .compare_globals import (
15
16
from v03_pipeline .lib .tasks .base .base_update_task import BaseUpdateTask
16
17
from v03_pipeline .lib .tasks .files import GCSorLocalTarget
17
18
18
- logger = logging . getLogger (__name__ )
19
+ logger = get_logger (__name__ )
19
20
20
21
21
22
class UpdatedReferenceDatasetCollectionTask (BaseUpdateTask ):
You can’t perform that action at this time.
0 commit comments