File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -272,11 +272,18 @@ def _get_log_rotation_configuration( self ):
272272
273273 rotation_count = self ._config .get ( "log_rotation_backup_count" )
274274 if rotation_count is None :
275- rotation_count = self ._global_config .log_rotation_backup_count
275+ # Sometimes global_config can be null if derived monitor did not pass one in.
276+ if self ._global_config is not None :
277+ rotation_count = self ._global_config .log_rotation_backup_count
278+ else :
279+ rotation_count = 2
276280
277281 max_bytes = self ._config .get ( "log_rotation_max_bytes" )
278282 if max_bytes is None :
279- max_bytes = self ._global_config .log_rotation_max_bytes
283+ if self ._global_config is not None :
284+ max_bytes = self ._global_config .log_rotation_max_bytes
285+ else :
286+ max_bytes = 20 * 1024 * 1024
280287
281288 return (rotation_count , max_bytes )
282289
You can’t perform that action at this time.
0 commit comments