标签:ram lin create rip err att param javascrip java
var fs = require(‘fs‘)
var util = require(‘util‘)
var logPath = ‘upgrade.log‘
var logFile = fs.createWriteStream(logPath, { flags: ‘a‘ })
console.log = function() {
logFile.write(util.format.apply(null, arguments) + ‘\n‘)
process.stdout.write(util.format.apply(null, arguments) + ‘\n‘)
}
console.error = function() {
logFile.write(util.format.apply(null, arguments) + ‘\n‘)
process.stderr.write(util.format.apply(null, arguments) + ‘\n‘)
}
标签:ram lin create rip err att param javascrip java
原文地址:https://www.cnblogs.com/youxin/p/14889043.html