mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-15 18:20:20 +00:00
Merge pull request #339 from nextcloud/enh/noid/improve-logging
improve error logging in dockeractionmanager
This commit is contained in:
commit
1fc8f2dd0f
2 changed files with 17 additions and 7 deletions
|
|
@ -141,4 +141,6 @@ $app->get('/', function (\Psr\Http\Message\RequestInterface $request, \Psr\Http\
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$errorMiddleware = $app->addErrorMiddleware(true, true, true);
|
||||||
|
|
||||||
$app->run();
|
$app->run();
|
||||||
|
|
|
||||||
|
|
@ -281,13 +281,18 @@ class DockerActionManager
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = $this->BuildApiUrl('containers/create?name=' . $container->GetIdentifier());
|
$url = $this->BuildApiUrl('containers/create?name=' . $container->GetIdentifier());
|
||||||
$this->guzzleClient->request(
|
try {
|
||||||
'POST',
|
$this->guzzleClient->request(
|
||||||
$url,
|
'POST',
|
||||||
[
|
$url,
|
||||||
'json' => $requestBody
|
[
|
||||||
]
|
'json' => $requestBody
|
||||||
);
|
]
|
||||||
|
);
|
||||||
|
} catch (RequestException $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function PullContainer(Container $container) : void
|
public function PullContainer(Container $container) : void
|
||||||
|
|
@ -344,6 +349,7 @@ class DockerActionManager
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
error_log('Could not get digest of container ' . $this->BuildApiUrl($containerName) . ' ' . $e->getMessage());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -365,6 +371,7 @@ class DockerActionManager
|
||||||
apcu_add($cacheKey, $tag);
|
apcu_add($cacheKey, $tag);
|
||||||
return $tag;
|
return $tag;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
error_log('Could not get current channel ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'latest';
|
return 'latest';
|
||||||
|
|
@ -451,6 +458,7 @@ class DockerActionManager
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} catch (RequestException $e) {
|
} catch (RequestException $e) {
|
||||||
|
error_log('Could not disconnect container from network ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue