MCPcopy Create free account
hub / github.com/SocketCluster/socketcluster / dockerLogs

Function dockerLogs

bin/actions/docker.js:99–121  ·  view source on GitHub ↗
(arg, options)

Source from the content-addressed store, hash-verified

97};
98
99const dockerLogs = async function (arg, options) {
100 let appName;
101 let commandRawArgsString = '';
102 if (options.f) commandRawArgsString = ' -f';
103 if (arg) {
104 appName = arg;
105 }
106
107 if (!appName) {
108 let appPath = '.';
109 let pkg = parsePackageFile(appPath);
110 appName = pkg.name;
111 }
112
113 let command = exec(`docker logs ${appName}${commandRawArgsString}`, (err) => {
114 if (err) {
115 this.errorLog(`Failed to get logs for '${appName}' app. ` + err);
116 }
117 process.exit();
118 });
119 command.stdout.pipe(process.stdout);
120 command.stderr.pipe(process.stderr);
121};
122
123module.exports = {
124 dockerRestart,

Callers

nothing calls this directly

Calls 1

parsePackageFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…