| <!-- |
| |
| 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> |
| <name>pulsar-functions-instance</name> |
| <monitorInterval>30</monitorInterval> |
| <Properties> |
| <Property> |
| <name>pulsar.log.appender</name> |
| <value>RollingFile</value> |
| </Property> |
| <Property> |
| <name>pulsar.log.level</name> |
| <value>info</value> |
| </Property> |
| <Property> |
| <name>bk.log.level</name> |
| <value>info</value> |
| </Property> |
| </Properties> |
| <Appenders> |
| <Console> |
| <name>Console</name> |
| <target>SYSTEM_OUT</target> |
| <PatternLayout> |
| <Pattern>%d{ISO8601_OFFSET_DATE_TIME_HHMM} [%t] %-5level %logger{36} - %msg%n</Pattern> |
| </PatternLayout> |
| </Console> |
| <RollingFile> |
| <name>RollingFile</name> |
| <fileName>${sys:pulsar.function.log.dir}/${sys:pulsar.function.log.file}.log</fileName> |
| <filePattern>${sys:pulsar.function.log.dir}/${sys:pulsar.function.log.file}-%d{MM-dd-yyyy}-%i.log.gz</filePattern> |
| <immediateFlush>true</immediateFlush> |
| <PatternLayout> |
| <Pattern>%d{ISO8601_OFFSET_DATE_TIME_HHMM} [%t] %-5level %logger{36} - %msg%n</Pattern> |
| </PatternLayout> |
| <Policies> |
| <TimeBasedTriggeringPolicy> |
| <interval>1</interval> |
| <modulate>true</modulate> |
| </TimeBasedTriggeringPolicy> |
| <SizeBasedTriggeringPolicy> |
| <size>1 GB</size> |
| </SizeBasedTriggeringPolicy> |
| <CronTriggeringPolicy> |
| <schedule>0 0 0 * * ?</schedule> |
| </CronTriggeringPolicy> |
| </Policies> |
| <DefaultRolloverStrategy> |
| <Delete> |
| <basePath>${sys:pulsar.function.log.dir}</basePath> |
| <maxDepth>2</maxDepth> |
| <IfFileName> |
| <glob>${sys:pulsar.function.log.file}*log.gz</glob> |
| </IfFileName> |
| <IfLastModified> |
| <age>30d</age> |
| </IfLastModified> |
| </Delete> |
| </DefaultRolloverStrategy> |
| </RollingFile> |
| <RollingRandomAccessFile> |
| <name>BkRollingFile</name> |
| <fileName>${sys:pulsar.function.log.dir}/${sys:pulsar.function.log.file}.bk</fileName> |
| <filePattern>${sys:pulsar.function.log.dir}/${sys:pulsar.function.log.file}.bk-%d{MM-dd-yyyy}-%i.log.gz</filePattern> |
| <immediateFlush>true</immediateFlush> |
| <PatternLayout> |
| <Pattern>%d{ISO8601_OFFSET_DATE_TIME_HHMM} [%t] %-5level %logger{36} - %msg%n</Pattern> |
| </PatternLayout> |
| <Policies> |
| <TimeBasedTriggeringPolicy> |
| <interval>1</interval> |
| <modulate>true</modulate> |
| </TimeBasedTriggeringPolicy> |
| <SizeBasedTriggeringPolicy> |
| <size>1 GB</size> |
| </SizeBasedTriggeringPolicy> |
| <CronTriggeringPolicy> |
| <schedule>0 0 0 * * ?</schedule> |
| </CronTriggeringPolicy> |
| </Policies> |
| <DefaultRolloverStrategy> |
| <Delete> |
| <basePath>${sys:pulsar.function.log.dir}</basePath> |
| <maxDepth>2</maxDepth> |
| <IfFileName> |
| <glob>${sys:pulsar.function.log.file}.bk*log.gz</glob> |
| </IfFileName> |
| <IfLastModified> |
| <age>30d</age> |
| </IfLastModified> |
| </Delete> |
| </DefaultRolloverStrategy> |
| </RollingRandomAccessFile> |
| </Appenders> |
| <Loggers> |
| <Logger> |
| <name>org.apache.pulsar.functions.runtime.shaded.org.apache.bookkeeper</name> |
| <level>${sys:bk.log.level}</level> |
| <additivity>false</additivity> |
| <AppenderRef> |
| <ref>BkRollingFile</ref> |
| </AppenderRef> |
| </Logger> |
| <Root> |
| <level>${sys:pulsar.log.level}</level> |
| <AppenderRef> |
| <ref>${sys:pulsar.log.appender}</ref> |
| <level>${sys:pulsar.log.level}</level> |
| </AppenderRef> |
| </Root> |
| </Loggers> |
| </Configuration> |