Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docker 如何使用standalone.xml在外部文件中捕获wildfly的应用程序日志_Docker_Logging_Wildfly - Fatal编程技术网

Docker 如何使用standalone.xml在外部文件中捕获wildfly的应用程序日志

Docker 如何使用standalone.xml在外部文件中捕获wildfly的应用程序日志,docker,logging,wildfly,Docker,Logging,Wildfly,我正在Windows机器中使用Wildfly docker映像。需要将应用程序日志发送到外部文件。我正在运行docker映像,就像 docker run-p8080:8080--env MYLOGS=C:/MYLOGS wildflytest应用程序:v.1.0.0.5。 在standalone.xml中,将路径设置为 并在日志模块中添加 <periodic-rotating-file-handler name="MY_HANDLER" autoflush=&quo

我正在Windows机器中使用Wildfly docker映像。需要将应用程序日志发送到外部文件。我正在运行docker映像,就像

docker run-p8080:8080--env MYLOGS=C:/MYLOGS wildflytest应用程序:v.1.0.0.5。 在standalone.xml中,将路径设置为


并在日志模块中添加

<periodic-rotating-file-handler name="MY_HANDLER" autoflush="true">
        <formatter>
                   <named-formatter name="PATTERN"/>
               </formatter>
               <file relative-to="logfile.path" path="applogs.log"/>
                   <suffix value=".yyyy-MM-dd"/>
                   <append value="true"/>
           </periodic-rotating-file-handler>
           <logger category="com.wildlfy" use-parent-handlers="false">
               <level name="INFO"/>
               <handlers>
                   <handler name="MY_HANDLER"/>
               </handlers>
           </logger>

之前,日志仅在控制台中发布,但在添加日志处理程序后,它也不会在控制台中捕获。我也看不到在指定位置创建的日志文件。 也不确定我的路径值是否在standalone.xml中读取。在standalone.xml文件中不接受echo。我该怎么查呢

<periodic-rotating-file-handler name="MY_HANDLER" autoflush="true">
        <formatter>
                   <named-formatter name="PATTERN"/>
               </formatter>
               <file relative-to="logfile.path" path="applogs.log"/>
                   <suffix value=".yyyy-MM-dd"/>
                   <append value="true"/>
           </periodic-rotating-file-handler>
           <logger category="com.wildlfy" use-parent-handlers="false">
               <level name="INFO"/>
               <handlers>
                   <handler name="MY_HANDLER"/>
               </handlers>
           </logger>