logs: use %o to format error

otherwise, they are printed as multi-line and this messes up tail+date formatting
This commit is contained in:
Girish Ramakrishnan
2023-04-16 10:49:59 +02:00
parent e6f870b220
commit c4f4f3e914
29 changed files with 70 additions and 73 deletions

View File

@@ -35,7 +35,7 @@ async function getServerIPv4(config) {
gCache.ipv4.request = null;
if (networkError || response.status !== 200) {
debug('getServerIPv4: Error getting IP', networkError);
debug('getServerIPv4: Error getting IP. %o', networkError);
throw new BoxError(BoxError.EXTERNAL_ERROR, 'Unable to detect IPv4. API server (ipv4.api.cloudron.io) unreachable');
}
@@ -69,7 +69,7 @@ async function getServerIPv6(config) {
gCache.ipv6.request = null;
if (networkError || response.status !== 200) {
debug('getServerIPv6: Error getting IP', networkError);
debug('getServerIPv6: Error getting IP. %o', networkError);
throw new BoxError(BoxError.EXTERNAL_ERROR, 'Unable to detect IPv6. API server (ipv6.api.cloudron.io) unreachable');
}