File tree Expand file tree Collapse file tree
edgelet/iotedge/src/check/checks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,21 +56,20 @@ impl ContainerEngineLogrotate {
5656 self . daemon_config = Some ( daemon_config. clone ( ) ) ;
5757
5858 match daemon_config. log_driver . as_deref ( ) {
59- Some ( "journald" ) => return Ok ( CheckResult :: Ok ) ,
60- None => return Ok ( CheckResult :: Warning ( anyhow ! ( MESSAGE ) ) ) ,
61- _ => ( ) ,
62- }
59+ None | Some ( "json-file" ) => {
60+ if let Some ( log_opts) = & daemon_config. log_opts {
61+ if log_opts. max_file . is_none ( ) {
62+ return Ok ( CheckResult :: Warning ( anyhow ! ( MESSAGE ) ) ) ;
63+ }
6364
64- if let Some ( log_opts) = & daemon_config. log_opts {
65- if log_opts. max_file . is_none ( ) {
66- return Ok ( CheckResult :: Warning ( anyhow ! ( MESSAGE ) ) ) ;
65+ if log_opts. max_size . is_none ( ) {
66+ return Ok ( CheckResult :: Warning ( anyhow ! ( MESSAGE ) ) ) ;
67+ }
68+ } else {
69+ return Ok ( CheckResult :: Warning ( anyhow ! ( MESSAGE ) ) ) ;
70+ }
6771 }
68-
69- if log_opts. max_size . is_none ( ) {
70- return Ok ( CheckResult :: Warning ( anyhow ! ( MESSAGE ) ) ) ;
71- }
72- } else {
73- return Ok ( CheckResult :: Warning ( anyhow ! ( MESSAGE ) ) ) ;
72+ _ => ( ) ,
7473 }
7574
7675 Ok ( CheckResult :: Ok )
You can’t perform that action at this time.
0 commit comments