【问题标题】:Config Visual studio code terminal for Mongodb为 Mongodb 配置 Visual Studio 代码终端
【发布时间】:2021-07-06 04:04:23
【问题描述】:

我正在尝试从 Visual Studio 代码中的 Powershell 终端启动 mongod.exe

directory/bin/mongod.exe --path=/directory/mongodb-data

然后我得到了很多这样的行:

{"t":{"$date":"2021-07-06T10:02:45.286+07:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLorce-enable TLS 1.0 specify --sslDisabledProtocols 'none'"} {"t":{"$date":"2021-07-06T10:02:45.624+07:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configuretworkInterface startup"}

如何配置终端显示如下(删除键或字段):

2021-07-06T10:02:45.286 I CONTROL [main] Automatically disabling TLorce-enable TLS 1.0 specify --sslDisabledProtocols 'none'

【问题讨论】:

    标签: mongodb powershell visual-studio-code terminal config


    【解决方案1】:

    在 Mongo 4.4 版本中,日志格式从纯文本更改为 JSON 样式

    您可以使用jq tool 重新格式化消息。

    【讨论】:

    • 谢谢,我会试试的。
    猜你喜欢
    • 2019-04-03
    • 2021-04-10
    • 1970-01-01
    • 2021-05-26
    • 1970-01-01
    • 1970-01-01
    • 2017-04-21
    • 2017-10-06
    • 2019-01-13
    相关资源
    最近更新 更多