我正在使用LogBack进行日志记录,目前我已将其设置为这样
<configuration>
<property resource="application.properties"/>
<timestamp key="byDay" datePattern="yyyyMMdd"/>
<if condition='property("spring.profiles.active").contains("prod")'>
<then>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${logging.path}/myFileExt-${byDay}.log</file>
<append>true</append>
<encoder>
<pattern>%d{HH:mm:ss.SSS - yyyy.MM.dd} - [%thread] %-5level %C - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.mywebsite.myapp.services" level="INFO">
<appender-ref ref="FILE"/>
</logger>
<logger name="com.mywebsite.myapp.utils" level="ERROR">
<appender-ref ref="FILE"/>
</logger>
<root>
<appender-ref ref="FILE"/>
</root>
</then>
<else>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} at line:%L - %msg%n</pattern>
</encoder>
</appender>
<root level="debug">
<appender-ref ref="STDOUT"/>
</root>
</else>
</if>
</configuration>
我想拥有它,因此服务包的记录级别为INFO或更高,而utils包的记录级别为ERROR或更高。但是我得到的都是这两个软件包的错误日志。肯定有我想念的东西。
我已阅读本文档https://logback.qos.ch/manual/configuration.html 但它没有按预期工作。
答案 0 :(得分:1)
获取记录器时,我使用了错误的类。
root@icp-master:~/mcm-3.1.1# docker login swgcluster.icp:8500
Username (admin): admin
Password:
Login Succeeded
应该是
root@icp-master:~/mcm-3.1.1# cloudctl catalog load-ppa-archive -a mcm-3.1.1-amd64.tgz --registry swgcluster.icp:8500
Expanding archive
OK
Importing docker images
Processing image: mcm-compliance:3.1.1
Loading Image
Tagging Image
Pushing image as: swgcluster.icp:8500/mcm-compliance:3.1.1
FAILED
Error during 'docker push swgcluster.icp:8500/mcm-compliance:3.1.1':
The push refers to repository [swgcluster.icp:8500/mcm-compliance]
897913ab6781: Preparing
9151cff5fa59: Preparing
50e922e82331: Preparing
fe5040b266fd: Preparing
df64d3292fd6: Preparing
unauthorized: authentication required
(Are you logged in to the docker registry?)