This is an automated email from the ASF dual-hosted git repository. yzhao pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mnemonic.git
commit 932f7bccbb325b55c351cf894e32eed9b4668583 Author: Xiaojin Jiao <[email protected]> AuthorDate: Mon Mar 14 14:33:28 2022 -0700 MNEMONIC-729: Configure the log4jv2.xml with correct settings that align with current log4jv1 settings Signed-off-by: Xiaojin Jiao <[email protected]> --- mnemonic-common/src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- mnemonic-core/src/main/resources/log4j2.xml | 142 ++++----------------- mnemonic-examples/src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- mnemonic-sessions/src/main/resources/log4j2.xml | 142 ++++----------------- .../src/main/resources/log4j2.xml | 142 ++++----------------- 15 files changed, 405 insertions(+), 1725 deletions(-) diff --git a/mnemonic-common/src/main/resources/log4j2.xml b/mnemonic-common/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-common/src/main/resources/log4j2.xml +++ b/mnemonic-common/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-computing-services/mnemonic-utilities-service/src/main/resources/log4j2.xml b/mnemonic-computing-services/mnemonic-utilities-service/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-computing-services/mnemonic-utilities-service/src/main/resources/log4j2.xml +++ b/mnemonic-computing-services/mnemonic-utilities-service/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-core/src/main/resources/log4j2.xml b/mnemonic-core/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-core/src/main/resources/log4j2.xml +++ b/mnemonic-core/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-examples/src/main/resources/log4j2.xml b/mnemonic-examples/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-examples/src/main/resources/log4j2.xml +++ b/mnemonic-examples/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-hadoop/mnemonic-hadoop-mapreduce/src/main/resources/log4j2.xml b/mnemonic-hadoop/mnemonic-hadoop-mapreduce/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-hadoop/mnemonic-hadoop-mapreduce/src/main/resources/log4j2.xml +++ b/mnemonic-hadoop/mnemonic-hadoop-mapreduce/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-memory-services/mnemonic-java-vmem-service/src/main/resources/log4j2.xml b/mnemonic-memory-services/mnemonic-java-vmem-service/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-memory-services/mnemonic-java-vmem-service/src/main/resources/log4j2.xml +++ b/mnemonic-memory-services/mnemonic-java-vmem-service/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-memory-services/mnemonic-nvml-pmem-service/src/main/resources/log4j2.xml b/mnemonic-memory-services/mnemonic-nvml-pmem-service/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-memory-services/mnemonic-nvml-pmem-service/src/main/resources/log4j2.xml +++ b/mnemonic-memory-services/mnemonic-nvml-pmem-service/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-memory-services/mnemonic-nvml-vmem-service/src/main/resources/log4j2.xml b/mnemonic-memory-services/mnemonic-nvml-vmem-service/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-memory-services/mnemonic-nvml-vmem-service/src/main/resources/log4j2.xml +++ b/mnemonic-memory-services/mnemonic-nvml-vmem-service/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-memory-services/mnemonic-pmalloc-service/src/main/resources/log4j2.xml b/mnemonic-memory-services/mnemonic-pmalloc-service/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-memory-services/mnemonic-pmalloc-service/src/main/resources/log4j2.xml +++ b/mnemonic-memory-services/mnemonic-pmalloc-service/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-memory-services/mnemonic-pmdk-pmem-service/src/main/resources/log4j2.xml b/mnemonic-memory-services/mnemonic-pmdk-pmem-service/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-memory-services/mnemonic-pmdk-pmem-service/src/main/resources/log4j2.xml +++ b/mnemonic-memory-services/mnemonic-pmdk-pmem-service/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-memory-services/mnemonic-pmdk-vmem-service/src/main/resources/log4j2.xml b/mnemonic-memory-services/mnemonic-pmdk-vmem-service/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-memory-services/mnemonic-pmdk-vmem-service/src/main/resources/log4j2.xml +++ b/mnemonic-memory-services/mnemonic-pmdk-vmem-service/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-memory-services/mnemonic-redis-service/src/main/resources/log4j2.xml b/mnemonic-memory-services/mnemonic-redis-service/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-memory-services/mnemonic-redis-service/src/main/resources/log4j2.xml +++ b/mnemonic-memory-services/mnemonic-redis-service/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/log4j2.xml b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/log4j2.xml +++ b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-sessions/src/main/resources/log4j2.xml b/mnemonic-sessions/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-sessions/src/main/resources/log4j2.xml +++ b/mnemonic-sessions/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration> diff --git a/mnemonic-spark/mnemonic-spark-core/src/main/resources/log4j2.xml b/mnemonic-spark/mnemonic-spark-core/src/main/resources/log4j2.xml index 92e9bbb..6334f2f 100644 --- a/mnemonic-spark/mnemonic-spark-core/src/main/resources/log4j2.xml +++ b/mnemonic-spark/mnemonic-spark-core/src/main/resources/log4j2.xml @@ -1,121 +1,33 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - <?xml version="1.0" encoding="UTF-8"?> -<Configuration status="warn"> - <Properties> - <Property name="service">api</Property> - <Property name="logFileRoot">/data/soft/log</Property> - <Property name="pattern">[%p %d] %c{1.} [%t] %m%n</Property> - </Properties> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Configuration status="INFO"> <Appenders> - <RollingRandomAccessFile name="fileAppender" fileName="${logFileRoot}/${service}.log" - filePattern="${logFileRoot}/bk/${service}-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="otherAppender" fileName="${logFileRoot}/${service}-other.log" - filePattern="${logFileRoot}/bk/${service}-other-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="paodingAppender" fileName="${logFileRoot}/${service}-paoding.log" - filePattern="${logFileRoot}/bk/${service}-paoding-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="passportAppender" fileName="${logFileRoot}/${service}-passport.log" - filePattern="${logFileRoot}/bk/${service}-passport-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingRandomAccessFile name="rootAppender" fileName="${logFileRoot}/${service}-root.log" - filePattern="${logFileRoot}/bk/${service}-root-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <Pattern>${pattern}</Pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingRandomAccessFile> - <RollingFile name="XLOGGER_SELF_APPENDER" fileName="${logFileRoot}/xlogger-self.log" - filePattern="${logFileRoot}/bk/xlogger-self-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - <SizeBasedTriggeringPolicy size="100MB"/> - </Policies> - <DefaultRolloverStrategy max="10"/> - </RollingFile> - <RollingFile name="trace-log" fileName="${logFileRoot}/xlogger-trace.log" - filePattern="${logFileRoot}/bk/xlogger-trace-%d{yyyy-MM-dd}-%i.log.gz"> - <PatternLayout> - <pattern>${pattern}</pattern> - </PatternLayout> - <Policies> - <TimeBasedTriggeringPolicy interval="1" modulate="true"/> - </Policies> - </RollingFile> - <ScribeXLogger name="Scribe" cluster="${xlogger-cluster}" blockWhenBufferFull="false" /> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> + </Console> </Appenders> <Loggers> - <AsyncLogger name="com.xxx.vip" level="${log4j_level}" additivity="false"> - <AppenderRef ref="fileAppender"/> - </AsyncLogger> - <AsyncLogger name="net.paoding.rose" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="paodingAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.passport" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="passportAppender"/> - </AsyncLogger> - <AsyncLogger name="com.xxx" level="${log4j_other_level}" additivity="false"> - <AppenderRef ref="otherAppender"/> - </AsyncLogger> - - <AsyncLogger name="com.xxx.common.logger.v2.XLogger" level="${log4j_level}" additivity="false"> - <AppenderRef ref="Scribe"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.XLoggerJson" level="${log4j_level}" additivity="false"> - <AppenderRef ref="trace-log"/> - </AsyncLogger> - <AsyncLogger name="com.xxx.common.logger.v2.ThriftScribeAppender" level="${log4j_level}" additivity="false" > - <AppenderRef ref="XLOGGER_SELF_APPENDER"/> - </AsyncLogger> - - <AsyncRoot level="${log4j_level}"> - <AppenderRef ref="rootAppender"/> - </AsyncRoot> + <Root level="warn"> + <AppenderRef ref="Console" /> + </Root> </Loggers> </Configuration>
