blob: 8d3d77862b3e382033befeea0508e7eb1bc73303 [file] [log] [blame]
;
; 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.
;
; START SNIPPET: doxia
log4php.rootLogger = DEBUG, a1, a2, a3
; The table is created if necessary and filled using prepared statements.
log4php.appender.a1 = LoggerAppenderPDO
log4php.appender.a1.dsn = "sqlite:target/appender_pdo.sqlite"
; The following shows an appender with customized INSERT statment and table name.
log4php.appender.a2 = LoggerAppenderPDO
log4php.appender.a2.user = root
log4php.appender.a2.password = secret
log4php.appender.a2.dsn = "mysql:host=localhost;dbname=test"
log4php.appender.a2.table = log2
log4php.appender.a2.insertSql = "INSERT INTO log2 (timestamp, logger, level, message, thread, file, line) VALUES (?,?,?,?,?,?,?)"
log4php.appender.a2.insertPattern = "%d,%c,%p,%m, %t,%F,%L"
; DEPRECATED: Using old style LoggerPatternLayout is considered unsafe as %m can contain quotes that mess up the SQL!
log4php.appender.a3 = LoggerAppenderPDO
log4php.appender.a3.dsn = "sqlite:target/appender_pdo.sqlite"
log4php.appender.a3.table = log3
log4php.appender.a3.sql = "INSERT INTO log3 (timestamp, level, message) VALUES ('%t', '%p', '%m')"