Ibm mobilefirst 正在清除Worklight中的console.log文件

Ibm mobilefirst 正在清除Worklight中的console.log文件,ibm-mobilefirst,worklight-server,websphere-liberty,Ibm Mobilefirst,Worklight Server,Websphere Liberty,在生产服务器中,我们面临一个问题,如日志文件夹中的console.log文件没有自动清除。它的增长速度超过了1 GB。因此,服务器空间利用率已达到100% 如何设置console.log的最大文件大小 如何归档console.log文件 我们是否需要在某个特定标记之前或之后在server.xml中编写logging标记?因为在我以前的项目中,我最后放置了“logging”标签,它工作得很好 与日志记录相关的Server.xml文件行 <logging maxFileSize="10" ma

在生产服务器中,我们面临一个问题,如日志文件夹中的console.log文件没有自动清除。它的增长速度超过了1 GB。因此,服务器空间利用率已达到100%

  • 如何设置console.log的最大文件大小
  • 如何归档console.log文件
  • 我们是否需要在某个特定标记之前或之后在server.xml中编写
    logging
    标记?因为在我以前的项目中,我最后放置了“logging”标签,它工作得很好 与日志记录相关的Server.xml文件行

    <logging maxFileSize="10" maxFiles="6" messageFileName="messages.log" logDirectory="/opt/IBM/WebSphere/Liberty/usr/servers/LibertyServer/logs" />
    <logging consoleLogLevel="AUDIT"/>
    
    })

    目前我可以在console.log文件中看到所有日志。我知道这是因为日志级别设置为审核。为了记录,我们经常使用logger.send from device将日志发送到服务器

    Worklight版本6.0.0.2 Liberty profile版本8.5.5.0-20130510-0831


    如果您需要任何信息,请发表评论。

    请注意,
    maxFiles
    maxFileSize
    不适用于console.log。请仔细阅读:

    如果你想要自由日志特性来管理日志文件大小和文件翻转,你应该考虑你是否真的打算使用控制台。在你的情况下,我建议不要使用它

    var wlInitOptions = {
        connectOnStartup : true,
        timeout : 60000,
        logger : {
            enabled: true, 
            level: 'debug', 
            stringify: true, 
            pretty: false,
            tag: {
                level: false, 
                pkg: true
            }, 
            whitelist: [], 
            blacklist: [],
            nativeOptions: {
                capture: true               
            }
        },
        analytics : {
            enabled: false
        }