-
$ node a.js 1>stdout.log 2>stderr.log ; cat stdout.log stderr.log >> all.log
a.js
console.log('Hello World');
stdout
-
root@a2980bfaeb16:/
root@a2980bfaeb16:/
Hello World
root@a2980bfaeb16:/
root@a2980bfaeb16:/
Hello World
stderr
( , stderr
) -
root@a2980bfaeb16:/
root@a2980bfaeb16:/
root@a2980bfaeb16:/
/a.js:1
(function (exports, require, module, __filename, __dirname) { console.g('Hello World');
^
TypeError: console.g is not a function
at Object.<anonymous> (/a.js:1:71)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:618:3
root@a2980bfaeb16:/
Hello World
/a.js:1
(function (exports, require, module, __filename, __dirname) { console.g('Hello World');
^
TypeError: console.g is not a function
at Object.<anonymous> (/a.js:1:71)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:618:3
, !
PS - , .