@@ -27,11 +27,9 @@ class WorkerArgs:
2727 modules : List [str ]
2828 tasks_pattern : str = "tasks.py"
2929 fs_discover : bool = False
30+ configure_logging : bool = True
3031 log_level : LogLevel = LogLevel .INFO
3132 workers : int = 2
32- log_collector_format : str = (
33- "[%(asctime)s][%(levelname)-7s][%(module)s:%(funcName)s:%(lineno)d] %(message)s"
34- )
3533 max_threadpool_threads : int = 10
3634 no_parse : bool = False
3735 shutdown_timeout : float = 5
@@ -118,18 +116,6 @@ def from_cli( # noqa: WPS213
118116 default = 2 ,
119117 help = "Number of worker child processes" ,
120118 )
121- parser .add_argument (
122- "--log-collector-format" ,
123- "-lcf" ,
124- type = str ,
125- default = (
126- "[%(asctime)s]"
127- "[%(levelname)-7s]"
128- "[%(module)s:%(funcName)s:%(lineno)d] "
129- "%(message)s"
130- ),
131- help = "Format which is used when collecting logs from function execution" ,
132- )
133119 parser .add_argument (
134120 "--no-parse" ,
135121 action = "store_true" ,
@@ -187,6 +173,12 @@ def from_cli( # noqa: WPS213
187173 default = 0 ,
188174 help = "Maximum prefetched tasks per worker process. " ,
189175 )
176+ parser .add_argument (
177+ "--no-configure-logging" ,
178+ action = "store_false" ,
179+ dest = "configure_logging" ,
180+ help = "Use this parameter if your application configures custom logging." ,
181+ )
190182
191183 namespace = parser .parse_args (args )
192184 return WorkerArgs (** namespace .__dict__ )
0 commit comments