html52.com
我爱小程序-开发者交流社区

log writeFile err writeFile:fail

log writeFile err writeFile:fail no such file or directory http://usr/miniprogramLog/log1

这是开发者工具控制台打印的,Windows v1.02.1807120版本,有谁遇到过???看着不爽,如何解决求教。

网友回复

將:

/appservice/__dev__/WAService.js:formatted

开发工具中清除文件缓存导致的写入失败,重启一下程序即可


s.surroundByTryCatchFactory)(function() {

                if (!m && !F && B.length && !L) {

                    for (var e = [], t = 0, n = 0; n < B.length; n++) {

                        var r = O(B[n]);

                        if (r > 102400)

                            console.warn("[wx.log warn] each log size exceed 100KB will be discard.");

                        else {

                            if (t + r > 102400)

                                break;

                            t += r,

                            e.push(B[n])

                        }

                    }

                    if (e.length) {

                        if (R.lastLogSize + t > 1048576) {

                            if (R.lastLogNum + 1 >= A + 2)

                                return L = !0,

                                void o();

                            R.lastLogNum++,

                            R.lastLogSize = 0

                        }

                        n == B.length ? B = [] : B.splice(0, n),

                        W[R.lastLogNum] || U(V(R.lastLogNum)) ? (0,

                        u.appendFile)({

                            filePath: V(R.lastLogNum),

                            data: (R.lastLogSize ? "\n" : "") + e.join("\n"),

                            encoding: "utf8",

                            fail: function(e) {

                                console.log("log appendFile err " + e.errMsg)

                            },

                            success: function(e) {}

                        }) : (0,

                        c.writeFile)({

                            filePath: V(R.lastLogNum),

                            data: (R.lastLogSize ? "\n" : "") + e.join("\n"),

                            encoding: "utf8",

                            fail: function(e) {

                                console.log("log writeFile err " + e.errMsg)

                            }

                        }),

                        R.lastLogSize += t

                    }

                }

            })


评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付