@startanaicompany/cli 1.4.19 → 1.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/logs.js +13 -4
package/package.json
CHANGED
package/src/commands/logs.js
CHANGED
|
@@ -188,11 +188,20 @@ async function getRuntimeLogs(applicationUuid, applicationName, options) {
|
|
|
188
188
|
logger.newline();
|
|
189
189
|
|
|
190
190
|
// Display logs
|
|
191
|
-
if (result.logs
|
|
192
|
-
result.logs
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
if (result.logs) {
|
|
192
|
+
if (Array.isArray(result.logs)) {
|
|
193
|
+
// Logs is an array
|
|
194
|
+
result.logs.forEach(log => {
|
|
195
|
+
console.log(log);
|
|
196
|
+
});
|
|
197
|
+
} else if (typeof result.logs === 'string') {
|
|
198
|
+
// Logs is a string (most common format from backend)
|
|
199
|
+
console.log(result.logs);
|
|
200
|
+
} else {
|
|
201
|
+
logger.warn('Unexpected log format');
|
|
202
|
+
}
|
|
195
203
|
} else if (typeof result === 'string') {
|
|
204
|
+
// Entire result is a string
|
|
196
205
|
console.log(result);
|
|
197
206
|
} else {
|
|
198
207
|
logger.warn('No logs available');
|