Woojoong Kim | d3c132c | 2020-08-26 14:46:47 -0700 | [diff] [blame] | 1 | {{- /* |
| 2 | |
| 3 | # Copyright 2020-present Open Networking Foundation |
| 4 | # |
| 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 7 | |
| 8 | */ -}} |
| 9 | |
| 10 | apiVersion: v1 |
| 11 | kind: ConfigMap |
| 12 | metadata: |
| 13 | name: tb-http-transport-config |
| 14 | labels: |
| 15 | name: tb-http-transport-config |
| 16 | data: |
| 17 | conf: | |
| 18 | export JAVA_OPTS="$JAVA_OPTS -Xloggc:/var/log/tb-http-transport/${TB_SERVICE_ID}/gc.log -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tb-http-transport/${TB_SERVICE_ID}/heapdump.bin -XX:+PrintGCDetails -XX:+PrintGCDateStamps" |
| 19 | export JAVA_OPTS="$JAVA_OPTS -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10" |
| 20 | export JAVA_OPTS="$JAVA_OPTS -XX:GCLogFileSize=10M -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" |
| 21 | export JAVA_OPTS="$JAVA_OPTS -XX:CMSWaitDuration=10000 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+CMSParallelInitialMarkEnabled" |
| 22 | export JAVA_OPTS="$JAVA_OPTS -XX:+CMSEdenChunksRecordAlways -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+ExitOnOutOfMemoryError" |
| 23 | export LOG_FILENAME=tb-http-transport.out |
| 24 | export LOADER_PATH=/usr/share/tb-http-transport/conf |
| 25 | logback: | |
| 26 | <!DOCTYPE configuration> |
| 27 | <configuration scan="true" scanPeriod="10 seconds"> |
| 28 | |
| 29 | <appender name="fileLogAppender" |
| 30 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 31 | <file>/var/log/tb-http-transport/${TB_SERVICE_ID}/tb-http-transport.log</file> |
| 32 | <rollingPolicy |
| 33 | class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 34 | <fileNamePattern>/var/log/tb-http-transport/${TB_SERVICE_ID}/tb-http-transport.%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
| 35 | <maxFileSize>100MB</maxFileSize> |
| 36 | <maxHistory>30</maxHistory> |
| 37 | <totalSizeCap>3GB</totalSizeCap> |
| 38 | </rollingPolicy> |
| 39 | <encoder> |
| 40 | <pattern>%d{ISO8601} [%thread] %-5level %logger{36} - %msg%n</pattern> |
| 41 | </encoder> |
| 42 | </appender> |
| 43 | |
| 44 | <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
| 45 | <encoder> |
| 46 | <pattern>%d{ISO8601} [%thread] %-5level %logger{36} - %msg%n</pattern> |
| 47 | </encoder> |
| 48 | </appender> |
| 49 | |
| 50 | <logger name="org.thingsboard.server" level="INFO" /> |
| 51 | |
| 52 | <root level="INFO"> |
| 53 | <appender-ref ref="fileLogAppender"/> |
| 54 | <appender-ref ref="STDOUT"/> |
| 55 | </root> |
| 56 | |
| 57 | </configuration> |