小编Cra*_*yKP的帖子

Winston - MaxListenersExceededWarning:检测到可能的 EventEmitter 内存泄漏

在 Winston-daily-rotate-file 包中使用文件日志记录时出现以下错误,代码与 Winston 控制台日志记录配合良好,

  MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
        at _addListener (events.js:256:17)
        at DailyRotateFile.addListener (events.js:272:10)
        at DailyRotateFile.once (events.js:301:8)
        at asyncForEach (/home/ubuntumachine/Desktop/project/node_modules/winston/lib/winston/exception-handler.js:217:17)
        at /home/ubuntumachine/Desktop/project/node_modules/async/internal/withoutIndex.js:9:16
        at eachOfArrayLike (/home/ubuntumachine/Desktop/project/node_modules/async/eachOf.js:65:9)
        at exports.default (/home/ubuntumachine/Desktop/project/node_modules/async/eachOf.js:9:5)
        at eachLimit (/home/ubuntumachine/Desktop/project/node_modules/async/forEach.js:80:24)
        at ExceptionHandler._uncaughtException (/home/ubuntumachine/Desktop/project/node_modules/winston/lib/winston/exception-handler.js:203:5)
        at process.emit (events.js:198:13)
    (node:20805) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit
        at _addListener (events.js:256:17)
        at DailyRotateFile.addListener (events.js:272:10)
        at DailyRotateFile.once (events.js:301:8)
        at asyncForEach (/home/ubuntumachine/Desktop/project/node_modules/winston/lib/winston/exception-handler.js:216:17)
        at /home/ubuntumachine/Desktop/project/node_modules/async/internal/withoutIndex.js:9:16
        at …
Run Code Online (Sandbox Code Playgroud)

node.js winston

9
推荐指数
2
解决办法
4409
查看次数

如何在 veutify 弹出模式上放置要使用输入元素(v-select)固定的下拉项?

一周前开始使用 Vuejs,我正在使用 vuetify(要求)。

vuetifyjs这是弹出模式 https://vuetifyjs.com/en/components/dialogs#form提供的示例

使用上面链接中的 codepen 重现问题。

在此输入图像描述

我的问题是,打开弹出模式后,当我尝试滚动时,单击(仅打开)下拉选择而不选择任何元素或项目。下拉元素也会随着滚动而滚动。

我们怎样才能阻止这种行为呢?

html javascript css vue.js vuetify.js

5
推荐指数
1
解决办法
3267
查看次数

如何区分kotlin的类继承(在Java中扩展)和接口实现(在中的实现),此处kotlin对这两者都使用(:)?

当我在Kotlin项目的中间工作时,我感到困惑,例如子类是实现另一个父类还是实现接口?就像我正在从jar中使用一些我不太了解的接口和类一样,有人会向我解释解决此问题的方法,因为我是kotlin的新手。
例如:
一个类定义

abstract class Employee (val firstName: String, val lastName: String) {
    abstract fun earnings(): Double
}
Run Code Online (Sandbox Code Playgroud)

这是由其他班级扩展的

abstract class Employee (val firstName: String, val lastName: String) {
    // ... 

    fun fullName(): String {
        return lastName + " " + firstName;
    }
}
Run Code Online (Sandbox Code Playgroud)

同样的接口

class Result
class Student 

interface StudentRepository {
    fun getById(id: Long): Student
    fun getResultsById(id: Long): List<Result>
}
Run Code Online (Sandbox Code Playgroud)

接口实现

class StudentLocalDataSource : StudentRepository {
    override fun getResults(id: Long): List<Result> {
       // do implementation
    }

    override fun getById(id: …
Run Code Online (Sandbox Code Playgroud)

java kotlin

3
推荐指数
1
解决办法
289
查看次数

标签 统计

css ×1

html ×1

java ×1

javascript ×1

kotlin ×1

node.js ×1

vue.js ×1

vuetify.js ×1

winston ×1