Anonymitaet commented on a change in pull request #10617:
URL: https://github.com/apache/pulsar/pull/10617#discussion_r633986678



##########
File path: site2/docs/functions-develop.md
##########
@@ -656,6 +656,182 @@ $ bin/pulsar-admin functions create \
 
 All logs produced by `LoggingFunction` above can be accessed via the 
`persistent://public/default/logging-function-logs` topic.
 
+#### Customizing Function Log Level
+Additionally, you can use the XML file, `functions_log4j2.xml`, to customize 
the function log level. 
+To customize the function log level, create or update `functions_log4j2.xml` 
in your Pulsar conf directory (e.g. `/etc/pulsar/`) to contain contents such as:

Review comment:
       ```suggestion
   To customize the function log level, create or update `functions_log4j2.xml` 
in your Pulsar conf directory (for example, `/etc/pulsar/`) to contain contents 
such as:
   ```

##########
File path: site2/docs/functions-develop.md
##########
@@ -656,6 +656,182 @@ $ bin/pulsar-admin functions create \
 
 All logs produced by `LoggingFunction` above can be accessed via the 
`persistent://public/default/logging-function-logs` topic.
 
+#### Customizing Function Log Level
+Additionally, you can use the XML file, `functions_log4j2.xml`, to customize 
the function log level. 
+To customize the function log level, create or update `functions_log4j2.xml` 
in your Pulsar conf directory (e.g. `/etc/pulsar/`) to contain contents such as:
+
+```xml
+<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>debug</value>
+        </Property>
+        <Property>
+            <name>bk.log.level</name>
+            <value>debug</value>
+        </Property>
+    </Properties>
+    <Appenders>
+        <Console>
+            <name>Console</name>
+            <target>SYSTEM_OUT</target>
+            <PatternLayout>
+                <Pattern>%d{HH:mm:ss.SSS} [%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{HH:mm:ss.SSS} [%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{HH:mm:ss.SSS} [%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>
+```
+
+The properties set like:
+```xml
+        <Property>
+            <name>pulsar.log.level</name>
+            <value>debug</value>
+        </Property>
+```
+will propagate to places where they're referenced, such as:
+```xml
+        <Root>
+            <level>${sys:pulsar.log.level}</level>
+            <AppenderRef>
+                <ref>${sys:pulsar.log.appender}</ref>
+                <level>${sys:pulsar.log.level}</level>
+            </AppenderRef>
+        </Root>
+```
+In that above example, debug level logging would be applied to ALL function 
logs. 

Review comment:
       ```suggestion
   In the above example, debug level logging would be applied to ALL function 
logs. 
   ```

##########
File path: site2/docs/functions-develop.md
##########
@@ -656,6 +656,182 @@ $ bin/pulsar-admin functions create \
 
 All logs produced by `LoggingFunction` above can be accessed via the 
`persistent://public/default/logging-function-logs` topic.
 
+#### Customizing Function Log Level
+Additionally, you can use the XML file, `functions_log4j2.xml`, to customize 
the function log level. 
+To customize the function log level, create or update `functions_log4j2.xml` 
in your Pulsar conf directory (e.g. `/etc/pulsar/`) to contain contents such as:
+
+```xml
+<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>debug</value>
+        </Property>
+        <Property>
+            <name>bk.log.level</name>
+            <value>debug</value>
+        </Property>
+    </Properties>
+    <Appenders>
+        <Console>
+            <name>Console</name>
+            <target>SYSTEM_OUT</target>
+            <PatternLayout>
+                <Pattern>%d{HH:mm:ss.SSS} [%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{HH:mm:ss.SSS} [%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{HH:mm:ss.SSS} [%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>
+```
+
+The properties set like:
+```xml
+        <Property>
+            <name>pulsar.log.level</name>
+            <value>debug</value>
+        </Property>
+```
+will propagate to places where they're referenced, such as:
+```xml
+        <Root>
+            <level>${sys:pulsar.log.level}</level>
+            <AppenderRef>
+                <ref>${sys:pulsar.log.appender}</ref>
+                <level>${sys:pulsar.log.level}</level>
+            </AppenderRef>
+        </Root>
+```
+In that above example, debug level logging would be applied to ALL function 
logs. 
+This may be more verbose than you desire. To be more selective, you can apply 
different log levels to different classes or modules. For example:
+
+```xml
+        <Logger>
+            <name>com.example.module</name>
+            <level>info</level>
+            <additivity>false</additivity>
+            <AppenderRef>
+                <ref>${sys:pulsar.log.appender}</ref>
+            </AppenderRef>
+        </Logger>
+```
+You can be more specific as well, such as applying a more verbose log level to 
a class in the module, such as:
+```xml
+        <Logger>
+            <name>com.example.module.className</name>
+            <level>debug</level>
+            <additivity>false</additivity>
+            <AppenderRef>
+                <ref>Console</ref>
+            </AppenderRef>
+        </Logger>
+```
+
+Each `<AppenderRef>` entry allows you to output the log to a target specified 
in the definition of the Appender. 

Review comment:
       ```suggestion
   Each `<AppenderRef>` entry allows you to output the log to a target 
specified in the definition of the Appender
   ```

##########
File path: site2/docs/functions-develop.md
##########
@@ -683,6 +859,7 @@ $ bin/pulsar-admin functions create \
 ```
 
 All logs produced by `LoggingFunction` above can be accessed via the 
`logging-function-logs` topic.
+Additionally, you can specify the function log level through the broker XML 
file, as described here: [Customizing Function Log 
Level](#customizing-function-log-level)

Review comment:
       ```suggestion
   Additionally, you can specify the function log level through the broker XML 
file as described in [Customize Function log 
level](#customize-function-log-level).
   ```

##########
File path: site2/docs/functions-develop.md
##########
@@ -656,6 +656,182 @@ $ bin/pulsar-admin functions create \
 
 All logs produced by `LoggingFunction` above can be accessed via the 
`persistent://public/default/logging-function-logs` topic.
 
+#### Customizing Function Log Level

Review comment:
       ```suggestion
   #### Customize Function log level
   ```
   
   In Pulsar docs, normally we use the base form of a verb (for easier search) 
and sentence case for headings.

##########
File path: site2/docs/functions-develop.md
##########
@@ -656,6 +656,182 @@ $ bin/pulsar-admin functions create \
 
 All logs produced by `LoggingFunction` above can be accessed via the 
`persistent://public/default/logging-function-logs` topic.
 
+#### Customizing Function Log Level
+Additionally, you can use the XML file, `functions_log4j2.xml`, to customize 
the function log level. 
+To customize the function log level, create or update `functions_log4j2.xml` 
in your Pulsar conf directory (e.g. `/etc/pulsar/`) to contain contents such as:
+
+```xml
+<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>debug</value>
+        </Property>
+        <Property>
+            <name>bk.log.level</name>
+            <value>debug</value>
+        </Property>
+    </Properties>
+    <Appenders>
+        <Console>
+            <name>Console</name>
+            <target>SYSTEM_OUT</target>
+            <PatternLayout>
+                <Pattern>%d{HH:mm:ss.SSS} [%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{HH:mm:ss.SSS} [%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{HH:mm:ss.SSS} [%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>
+```
+
+The properties set like:
+```xml
+        <Property>
+            <name>pulsar.log.level</name>
+            <value>debug</value>
+        </Property>
+```
+will propagate to places where they're referenced, such as:
+```xml
+        <Root>
+            <level>${sys:pulsar.log.level}</level>
+            <AppenderRef>
+                <ref>${sys:pulsar.log.appender}</ref>
+                <level>${sys:pulsar.log.level}</level>
+            </AppenderRef>
+        </Root>
+```
+In that above example, debug level logging would be applied to ALL function 
logs. 
+This may be more verbose than you desire. To be more selective, you can apply 
different log levels to different classes or modules. For example:
+
+```xml
+        <Logger>
+            <name>com.example.module</name>
+            <level>info</level>
+            <additivity>false</additivity>
+            <AppenderRef>
+                <ref>${sys:pulsar.log.appender}</ref>
+            </AppenderRef>
+        </Logger>
+```
+You can be more specific as well, such as applying a more verbose log level to 
a class in the module, such as:
+```xml
+        <Logger>
+            <name>com.example.module.className</name>
+            <level>debug</level>
+            <additivity>false</additivity>
+            <AppenderRef>
+                <ref>Console</ref>
+            </AppenderRef>
+        </Logger>
+```
+
+Each `<AppenderRef>` entry allows you to output the log to a target specified 
in the definition of the Appender. 
+
+```xml 
+<additivity>false</additivity>
+```
+prevents the logger from duplicating log messages in the case that more than 
one or more `<Logger>` entries overlap a class or module.

Review comment:
       ```suggestion
   and prevent the logger from duplicating log messages in the case that more 
than one or more `<Logger>` entries overlap a class or module.
   ```
   
   do you mean this? 
   `xx allows you to output xxx and prevent xxx`? or 
   `xx allows you to output xxx, which prevents xxx`?

##########
File path: site2/docs/functions-develop.md
##########
@@ -656,6 +656,182 @@ $ bin/pulsar-admin functions create \
 
 All logs produced by `LoggingFunction` above can be accessed via the 
`persistent://public/default/logging-function-logs` topic.
 
+#### Customizing Function Log Level
+Additionally, you can use the XML file, `functions_log4j2.xml`, to customize 
the function log level. 
+To customize the function log level, create or update `functions_log4j2.xml` 
in your Pulsar conf directory (e.g. `/etc/pulsar/`) to contain contents such as:
+
+```xml
+<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>debug</value>
+        </Property>
+        <Property>
+            <name>bk.log.level</name>
+            <value>debug</value>
+        </Property>
+    </Properties>
+    <Appenders>
+        <Console>
+            <name>Console</name>
+            <target>SYSTEM_OUT</target>
+            <PatternLayout>
+                <Pattern>%d{HH:mm:ss.SSS} [%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{HH:mm:ss.SSS} [%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{HH:mm:ss.SSS} [%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>
+```
+
+The properties set like:
+```xml
+        <Property>
+            <name>pulsar.log.level</name>
+            <value>debug</value>
+        </Property>
+```
+will propagate to places where they're referenced, such as:

Review comment:
       ```suggestion
   propagate to places where they are referenced, such as:
   ```
   
   - Use present tense if you are covering facts that were, are, and forever 
shall be true.
   Always use the present tense in technical writing by default. Only use past 
or future tenses when you’re actually writing about something that happened in 
the past or will happen in the future.
   
   - Do not use contractions in technical information.

##########
File path: site2/docs/functions-develop.md
##########
@@ -709,7 +886,9 @@ func main() {
 }
 ```
 
-When you use `logTopic` related functionalities in Go Function, import 
`github.com/apache/pulsar/pulsar-function-go/logutil`, and you do not have to 
use the `getLogger()` context object. 
+When you use `logTopic` related functionalities in Go Function, import 
`github.com/apache/pulsar/pulsar-function-go/logutil`, and you do not have to 
use the `getLogger()` context object.
+
+Additionally, you can specify the function log level through the broker XML 
file, as described here: [Customizing Function Log 
Level](#customizing-function-log-level)

Review comment:
       same




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to