|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | +# contributor license agreements. See the NOTICE file distributed with |
| 4 | +# this work for additional information regarding copyright ownership. |
| 5 | +# The ASF licenses this file to you under the Apache License, Version 2.0 |
| 6 | +# (the "License"); you may not use this file except in compliance with |
| 7 | +# the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | +## |
| 18 | +# tag::appender[] |
| 19 | +appender.0.type = Cassandra |
| 20 | +appender.0.name = CASSANDRA |
| 21 | +appender.0.clusterName = test-cluster |
| 22 | +appender.0.keyspace = test |
| 23 | +appender.0.table = logs |
| 24 | +# <1> |
| 25 | +appender.0.bufferSize = 10 |
| 26 | +appender.0.batched = true |
| 27 | + |
| 28 | +# <2> |
| 29 | +appender.0.addr[0].type = SocketAddress |
| 30 | +appender.0.addr[0].host = server1 |
| 31 | +appender.0.addr[0].port = 9042 |
| 32 | + |
| 33 | +appender.0.addr[1].type = SocketAddress |
| 34 | +appender.0.addr[1].host = server2 |
| 35 | +appender.0.addr[1].port = 9042 |
| 36 | + |
| 37 | +# <3> |
| 38 | +appender.0.col[0].type = ColumnMapping |
| 39 | +appender.0.col[0].name = uuid |
| 40 | +appender.0.col[0].pattern = %uuid{TIME} |
| 41 | +appender.0.col[0].columnType = java.util.UUID |
| 42 | + |
| 43 | +appender.0.col[1].type = ColumnMapping |
| 44 | +appender.0.col[1].name = timestamp |
| 45 | +appender.0.col[1].timestamp = java.util.Date |
| 46 | + |
| 47 | +appender.0.col[2].type = ColumnMapping |
| 48 | +appender.0.col[2].name = level |
| 49 | +appender.0.col[2].pattern = %level |
| 50 | + |
| 51 | +appender.0.col[3].type = ColumnMapping |
| 52 | +appender.0.col[3].name = marker |
| 53 | +appender.0.col[3].pattern = %marker |
| 54 | + |
| 55 | +appender.0.col[4].type = ColumnMapping |
| 56 | +appender.0.col[4].name = logger |
| 57 | +appender.0.col[4].pattern = %logger |
| 58 | + |
| 59 | +appender.0.col[5].type = ColumnMapping |
| 60 | +appender.0.col[5].name = message |
| 61 | +appender.0.col[5].pattern = %message |
| 62 | + |
| 63 | +appender.0.col[6].type = ColumnMapping |
| 64 | +appender.0.col[6].name = mdc |
| 65 | +appender.0.col[6].columnType = org.apache.logging.log4j.spi.ThreadContextMap |
| 66 | + |
| 67 | +appender.0.col[7].type = ColumnMapping |
| 68 | +appender.0.col[7].name = ndc |
| 69 | +appender.0.col[7].columnType = org.apache.logging.log4j.spi.ThreadContextStack |
| 70 | +# end::appender[] |
| 71 | + |
| 72 | +rootLogger.level = INFO |
| 73 | +rootLogger.appenderRef.0.ref= CASSANDRA |
0 commit comments