├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── .rultor.yml ├── .travis.yml ├── LICENSE.txt ├── README.md ├── mvnw ├── mvnw.cmd ├── pmdruleset.xml ├── pom.xml ├── pubring.gpg.asc ├── secring.gpg.asc ├── settings.xml.asc └── src ├── checkstyle ├── checkstyle-header.txt └── checkstyle.xml └── main ├── java └── com │ └── integralblue │ └── log4jdbc │ └── spring │ ├── Log4jdbcAutoConfiguration.java │ └── Log4jdbcBeanPostProcessor.java └── resources └── META-INF ├── spring-configuration-metadata.json └── spring.factories /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | 3 | # Eclipse 4 | .pmd 5 | .pmdruleset.xml 6 | .checkstyle 7 | .classpath 8 | .project 9 | .settings 10 | .factorypath 11 | .springBeans 12 | 13 | # Intellij 14 | .idea 15 | *.iml 16 | *.iws 17 | 18 | # Mac 19 | .DS_Store 20 | /.apt_generated/ 21 | -------------------------------------------------------------------------------- /.mvn/wrapper/MavenWrapperDownloader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import java.net.*; 17 | import java.io.*; 18 | import java.nio.channels.*; 19 | import java.util.Properties; 20 | 21 | public class MavenWrapperDownloader { 22 | 23 | private static final String WRAPPER_VERSION = "0.5.5"; 24 | /** 25 | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. 26 | */ 27 | private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" 28 | + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; 29 | 30 | /** 31 | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to 32 | * use instead of the default one. 33 | */ 34 | private static final String MAVEN_WRAPPER_PROPERTIES_PATH = 35 | ".mvn/wrapper/maven-wrapper.properties"; 36 | 37 | /** 38 | * Path where the maven-wrapper.jar will be saved to. 39 | */ 40 | private static final String MAVEN_WRAPPER_JAR_PATH = 41 | ".mvn/wrapper/maven-wrapper.jar"; 42 | 43 | /** 44 | * Name of the property which should be used to override the default download url for the wrapper. 45 | */ 46 | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; 47 | 48 | public static void main(String args[]) { 49 | System.out.println("- Downloader started"); 50 | File baseDirectory = new File(args[0]); 51 | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); 52 | 53 | // If the maven-wrapper.properties exists, read it and check if it contains a custom 54 | // wrapperUrl parameter. 55 | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); 56 | String url = DEFAULT_DOWNLOAD_URL; 57 | if(mavenWrapperPropertyFile.exists()) { 58 | FileInputStream mavenWrapperPropertyFileInputStream = null; 59 | try { 60 | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); 61 | Properties mavenWrapperProperties = new Properties(); 62 | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); 63 | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); 64 | } catch (IOException e) { 65 | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); 66 | } finally { 67 | try { 68 | if(mavenWrapperPropertyFileInputStream != null) { 69 | mavenWrapperPropertyFileInputStream.close(); 70 | } 71 | } catch (IOException e) { 72 | // Ignore ... 73 | } 74 | } 75 | } 76 | System.out.println("- Downloading from: " + url); 77 | 78 | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); 79 | if(!outputFile.getParentFile().exists()) { 80 | if(!outputFile.getParentFile().mkdirs()) { 81 | System.out.println( 82 | "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); 83 | } 84 | } 85 | System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); 86 | try { 87 | downloadFileFromURL(url, outputFile); 88 | System.out.println("Done"); 89 | System.exit(0); 90 | } catch (Throwable e) { 91 | System.out.println("- Error downloading"); 92 | e.printStackTrace(); 93 | System.exit(1); 94 | } 95 | } 96 | 97 | private static void downloadFileFromURL(String urlString, File destination) throws Exception { 98 | if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { 99 | String username = System.getenv("MVNW_USERNAME"); 100 | char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); 101 | Authenticator.setDefault(new Authenticator() { 102 | @Override 103 | protected PasswordAuthentication getPasswordAuthentication() { 104 | return new PasswordAuthentication(username, password); 105 | } 106 | }); 107 | } 108 | URL website = new URL(urlString); 109 | ReadableByteChannel rbc; 110 | rbc = Channels.newChannel(website.openStream()); 111 | FileOutputStream fos = new FileOutputStream(destination); 112 | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); 113 | fos.close(); 114 | rbc.close(); 115 | } 116 | 117 | } 118 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/candrews/log4jdbc-spring-boot-starter/b5a8c34aad70599d025114f4e07f3ca3f4bfd109/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /.rultor.yml: -------------------------------------------------------------------------------- 1 | docker: 2 | image: yegor256/java8 3 | decrypt: 4 | settings.xml: "repo/settings.xml.asc" 5 | pubring.gpg: "repo/pubring.gpg.asc" 6 | secring.gpg: "repo/secring.gpg.asc" 7 | merge: 8 | fast-forward: no 9 | script: | 10 | ./mvnw clean install -Prultor -Psonatype --settings /home/r/settings.xml -B -e 11 | deploy: 12 | script: | 13 | ./mvnw clean install nexus-staging:deploy -Prultor -Psonatype --settings /home/r/settings.xml -B -e 14 | release: 15 | script: | 16 | ./mvnw versions:set "-DnewVersion=${tag}" 17 | git commit -am "${tag}" 18 | ./mvnw clean deploy -Prultor -Psonatype --settings /home/r/settings.xml -B -e 19 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | sudo: false 3 | language: java 4 | jdk: 5 | - openjdk8 6 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Log4jdbc Spring Boot Starter 2 | ============================ 3 | 4 | [![DevOps By Rultor.com](http://www.rultor.com/b/candrews/log4jdbc-spring-boot-starter)](http://www.rultor.com/p/candrews/log4jdbc-spring-boot-starter) 5 | [![Build Status](https://travis-ci.org/candrews/log4jdbc-spring-boot-starter.svg?branch=master)](https://travis-ci.org/candrews/log4jdbc-spring-boot-starter) 6 | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.integralblue/log4jdbc-spring-boot-starter/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.integralblue/log4jdbc-spring-boot-starter) 7 | [![Reference Status](https://www.versioneye.com/java/com.integralblue:log4jdbc-spring-boot-starter/reference_badge.svg?style=flat-square)](https://www.versioneye.com/java/com.integralblue:log4jdbc-spring-boot-starter/references) 8 | [![Dependency Status](https://www.versioneye.com/java/com.integralblue:log4jdbc-spring-boot-starter/badge?style=flat-square)](https://www.versioneye.com/java/com.integralblue:log4jdbc-spring-boot-starter) 9 | [![Javadoc](https://javadoc-emblem.rhcloud.com/doc/com.integralblue/log4jdbc-spring-boot-starter/badge.svg)](http://www.javadoc.io/doc/com.integralblue/log4jdbc-spring-boot-starter) 10 | 11 | The Log4jdbc Spring Boot Starter facilitates the quick and easy use of [log4jdbc](http://log4jdbc.brunorozendo.com/) in Spring Boot projects. 12 | 13 | Log4jdbc is particularly handy as it can log SQL that is ready to run. Instead of logging SQL with '?' where parameter values need to be inserted (like, for example, what `spring.jpa.properties.hibernate.show_sql=true` does), log4jdbc can log SQL with those place holders substituted with their actual values. So instead of `select name from User where id = ?` the log will say `select name from User where id = 5`. 14 | 15 | Quick Start 16 | =========== 17 | * **Minimum requirements** — You'll need Java 1.8+ and Spring Boot 2.1+. 18 | * **Download** — Depend on this library using, for example, Maven: 19 | ```xml 20 | 21 | com.integralblue 22 | log4jdbc-spring-boot-starter 23 | [INSERT VERSION HERE] 24 | 25 | ``` 26 | * **Configure** — In application.properties, enable a logger (for example, `logging.level.jdbc.sqlonly=ERROR`). See [Loggers](#loggers) for details. 27 | 28 | Configuration 29 | ============= 30 | Use application.properties to configure log4jdbc. There is [Spring configuration meta-data](http://docs.spring.io/spring-boot/docs/current/reference/html/configuration-metadata.html) for IDE autocompletion; see [spring-configuration-metadata.json](src/main/resources/META-INF/spring-configuration-metadata.json). Supported settings are: 31 | 32 | |property |default | description 33 | |---------------------------------------------|--------------------------------------------------|------------- 34 | |log4jdbc.drivers | |One or more fully qualified class names for JDBC drivers that log4jdbc should load and wrap. If more than one driver needs to be specified here, they should be comma separated with no spaces. This option is not normally needed because most popular JDBC drivers are already loaded by default. This should be used if one or more additional JDBC drivers that (log4jdbc doesn't already wrap) needs to be included. 35 | |log4jdbc.auto.load.popular.drivers |true |Set this to false to disable the feature where popular drivers are automatically loaded. If this is false, you must set the log4jdbc.drivers property in order to load the driver(s) you want. 36 | |log4jdbc.debug.stack.prefix | |A REGEX matching the package name of your application. The call stack will be searched down to the first occurrence of a class that has the matching REGEX. If this is not set, the actual class that called into log4jdbc is used in the debug output (in many cases this will be a connection pool class). For example, setting a system property such as this: `-Dlog4jdbc.debug.stack.prefix=^com\.mycompany\.myapp.*` would cause the call stack to be searched for the first call that came from code in the com.mycompany.myapp package or below, thus if all of your sql generating code was in code located in the com.mycompany.myapp package or any subpackages, this would be printed in the debug information, rather than the package name for a connection pool, object relational system, etc. Please note that the behavior of this property has changed as compared to the standard log4jdbc implementation. This property is now a REGEX, instead of being just the package prefix of the stack trace. So, for instance, if you want to target the prefix org.mypackage, the value of this property should be: `^org\.mypackage.*.` 37 | |log4jdbc.sqltiming.warn.threshold | |Millisecond time value. Causes SQL that takes the number of milliseconds specified or more time to execute to be logged at the warning level in the sqltiming log. Note that the sqltiming log must be enabled at the warn log level for this feature to work. Also the logged output for this setting will log with debug information that is normally only shown when the sqltiming log is enabled at the debug level. This can help you to more quickly find slower running SQL without adding overhead or logging for normal running SQL that executes below the threshold level (if the logging level is set appropriately). 38 | |log4jdbc.sqltiming.error.threshold | |Millisecond time value. Causes SQL that takes the number of milliseconds specified or more time to execute to be logged at the error level in the sqltiming log. Note that the sqltiming log must be enabled at the error log level for this feature to work. Also the logged output for this setting will log with debug information that is normally only shown when the sqltiming log is enabled at the debug level. This can help you to more quickly find slower running SQL without adding overhead or logging for normal running SQL that executes below the threshold level (if the logging level is set appropriately). 39 | |log4jdbc.dump.booleanastruefalse |false |When dumping boolean values in SQL, dump them as 'true' or 'false'. If this option is not set, they will be dumped as 1 or 0 as many databases do not have a boolean type, and this allows for more portable sql dumping. 40 | |log4jdbc.dump.sql.maxlinelength |90 |When dumping SQL, if this is greater than 0, than the dumped SQL will be broken up into lines that are no longer than this value. Set this value to 0 if you don't want log4jdbc to try and break the SQL into lines this way. In future versions of log4jdbc, this will probably default to 0.| 41 | |log4jdbc.dump.fulldebugstacktrace |false |If dumping in debug mode, dump the full stack trace. This will result in EXTREMELY voluminous output, but can be very useful under some circumstances when trying to track down the call chain for generated SQL. 42 | |log4jdbc.dump.sql.select |true |Set this to false to suppress SQL select statements in the output. Note that if you use the Log4j 2 logger, it is also possible to control select statements output via the marker LOG4JDBC_SELECT (see [section "Disabling some SQL operations, or dispatching them in different files"](http://log4jdbc.brunorozendo.com/)). The use of this property prepend the use of the marker. 43 | |log4jdbc.dump.sql.insert |true |Set this to false to suppress SQL insert statements in the output. Note that if you use the Log4j 2 logger, it is also possible to control insert statements output via the marker LOG4JDBC_INSERT (see [section "Disabling some SQL operations, or dispatching them in different files"](http://log4jdbc.brunorozendo.com/)). The use of this property prepend the use of the marker. 44 | |log4jdbc.dump.sql.update |true |Set this to false to suppress SQL update statements in the output. Note that if you use the Log4j 2 logger, it is also possible to control update statements output via the marker LOG4JDBC_UPDATE (see [section "Disabling some SQL operations, or dispatching them in different files"](http://log4jdbc.brunorozendo.com/)). The use of this property prepend the use of the marker. 45 | |log4jdbc.dump.sql.delete |true |Set this to false to suppress SQL delete statements in the output. Note that if you use the Log4j 2 logger, it is also possible to control delete statements output via the marker LOG4JDBC_DELETE (see [section "Disabling some SQL operations, or dispatching them in different files"](http://log4jdbc.brunorozendo.com/)). The use of this property prepend the use of the marker. 46 | |log4jdbc.dump.sql.create |true |Set this to false to suppress SQL create statements in the output. Note that if you use the Log4j 2 logger, it is also possible to control create statements output via the marker LOG4JDBC_CREATE (see [section "Disabling some SQL operations, or dispatching them in different files"](http://log4jdbc.brunorozendo.com/)). The use of this property prepend the use of the marker. 47 | |log4jdbc.dump.sql.addsemicolon |false |Set this to true to add an extra semicolon to the end of SQL in the output. This can be useful when you want to generate SQL from a program with log4jdbc in order to create a script to feed back into a database to run at a later time. 48 | |log4jdbc.spylogdelegator.name |net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator |The qualified class name of the SpyLogDelegator to use. Note that if you want to use log4jdbc-log4j2 with Log4j 2 rather than SLF4J, you must set this property to: `net.sf.log4jdbc.log.log4j2.Log4j2SpyLogDelegator`. Note that the default in this Starter is to use SLF4J which is different from the log4jdbc library's default. 49 | |log4jdbc.statement.warn |false |Set this to true to display warnings (Why would you care?) in the log when Statements are used in the log. 50 | |log4jdbc.trim.sql |true |Set this to false to not trim the logged SQL. 51 | |log4jdbc.trim.sql.extrablanklines |true |Set this to false to not trim extra blank lines in the logged SQL (by default, when more than one blank line in a row occurs, the contiguous lines are collapsed to just one blank line). 52 | |log4jdbc.suppress.generated.keys.exception |false |Set to true to ignore any exception produced by the method `Statement.getGeneratedKeys()` 53 | |log4jdbc.log4j2.properties.file |log4jdbc.log4j2.properties |Set the name of the property file to use 54 | 55 | 56 | Loggers 57 | ======= 58 | Note that, by default, nothing will be logged. In fact, if all the loggers are disabled (which is the default), then log4jdbc doesn't even wrap the `java.sql.Connection` returned by `javax.sql.DataSource.getConnection()` (which is useful for production configurations). 59 | 60 | |logger |description 61 | |--------------------|------------ 62 | |jdbc.sqlonly |Logs only SQL. SQL executed within a prepared statement is automatically shown with it's bind arguments replaced with the data bound at that position, for greatly increased readability. 63 | |jdbc.sqltiming |Logs the SQL, post-execution, including timing statistics on how long the SQL took to execute. 64 | |jdbc.audit |Logs ALL JDBC calls except for ResultSets. This is a very voluminous output, and is not normally needed unless tracking down a specific JDBC problem. 65 | |jdbc.resultset |Even more voluminous, because all calls to ResultSet objects are logged. 66 | |jdbc.resultsettable |Log the jdbc results as a table. Level debug will fill in unread values in the result set. 67 | |jdbc.connection |Logs connection open and close events as well as dumping all open connection numbers. This is very useful for hunting down connection leak problems. 68 | 69 | To set a logger's level, use application.properties in the same way any other log level is configured (see the [Spring Boot Logging Guide](https://docs.spring.io/spring-boot/docs/current/reference/html/howto-logging.html) for reference). For example, `logging.level.jdbc.sqlonly=DEBUG` 70 | -------------------------------------------------------------------------------- /mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven2 Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /etc/mavenrc ] ; then 40 | . /etc/mavenrc 41 | fi 42 | 43 | if [ -f "$HOME/.mavenrc" ] ; then 44 | . "$HOME/.mavenrc" 45 | fi 46 | 47 | fi 48 | 49 | # OS specific support. $var _must_ be set to either true or false. 50 | cygwin=false; 51 | darwin=false; 52 | mingw=false 53 | case "`uname`" in 54 | CYGWIN*) cygwin=true ;; 55 | MINGW*) mingw=true;; 56 | Darwin*) darwin=true 57 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 58 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 59 | if [ -z "$JAVA_HOME" ]; then 60 | if [ -x "/usr/libexec/java_home" ]; then 61 | export JAVA_HOME="`/usr/libexec/java_home`" 62 | else 63 | export JAVA_HOME="/Library/Java/Home" 64 | fi 65 | fi 66 | ;; 67 | esac 68 | 69 | if [ -z "$JAVA_HOME" ] ; then 70 | if [ -r /etc/gentoo-release ] ; then 71 | JAVA_HOME=`java-config --jre-home` 72 | fi 73 | fi 74 | 75 | if [ -z "$M2_HOME" ] ; then 76 | ## resolve links - $0 may be a link to maven's home 77 | PRG="$0" 78 | 79 | # need this for relative symlinks 80 | while [ -h "$PRG" ] ; do 81 | ls=`ls -ld "$PRG"` 82 | link=`expr "$ls" : '.*-> \(.*\)$'` 83 | if expr "$link" : '/.*' > /dev/null; then 84 | PRG="$link" 85 | else 86 | PRG="`dirname "$PRG"`/$link" 87 | fi 88 | done 89 | 90 | saveddir=`pwd` 91 | 92 | M2_HOME=`dirname "$PRG"`/.. 93 | 94 | # make it fully qualified 95 | M2_HOME=`cd "$M2_HOME" && pwd` 96 | 97 | cd "$saveddir" 98 | # echo Using m2 at $M2_HOME 99 | fi 100 | 101 | # For Cygwin, ensure paths are in UNIX format before anything is touched 102 | if $cygwin ; then 103 | [ -n "$M2_HOME" ] && 104 | M2_HOME=`cygpath --unix "$M2_HOME"` 105 | [ -n "$JAVA_HOME" ] && 106 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 107 | [ -n "$CLASSPATH" ] && 108 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 109 | fi 110 | 111 | # For Mingw, ensure paths are in UNIX format before anything is touched 112 | if $mingw ; then 113 | [ -n "$M2_HOME" ] && 114 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 115 | [ -n "$JAVA_HOME" ] && 116 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 117 | fi 118 | 119 | if [ -z "$JAVA_HOME" ]; then 120 | javaExecutable="`which javac`" 121 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 122 | # readlink(1) is not available as standard on Solaris 10. 123 | readLink=`which readlink` 124 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 125 | if $darwin ; then 126 | javaHome="`dirname \"$javaExecutable\"`" 127 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 128 | else 129 | javaExecutable="`readlink -f \"$javaExecutable\"`" 130 | fi 131 | javaHome="`dirname \"$javaExecutable\"`" 132 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 133 | JAVA_HOME="$javaHome" 134 | export JAVA_HOME 135 | fi 136 | fi 137 | fi 138 | 139 | if [ -z "$JAVACMD" ] ; then 140 | if [ -n "$JAVA_HOME" ] ; then 141 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 142 | # IBM's JDK on AIX uses strange locations for the executables 143 | JAVACMD="$JAVA_HOME/jre/sh/java" 144 | else 145 | JAVACMD="$JAVA_HOME/bin/java" 146 | fi 147 | else 148 | JAVACMD="`which java`" 149 | fi 150 | fi 151 | 152 | if [ ! -x "$JAVACMD" ] ; then 153 | echo "Error: JAVA_HOME is not defined correctly." >&2 154 | echo " We cannot execute $JAVACMD" >&2 155 | exit 1 156 | fi 157 | 158 | if [ -z "$JAVA_HOME" ] ; then 159 | echo "Warning: JAVA_HOME environment variable is not set." 160 | fi 161 | 162 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 163 | 164 | # traverses directory structure from process work directory to filesystem root 165 | # first directory with .mvn subdirectory is considered project base directory 166 | find_maven_basedir() { 167 | 168 | if [ -z "$1" ] 169 | then 170 | echo "Path not specified to find_maven_basedir" 171 | return 1 172 | fi 173 | 174 | basedir="$1" 175 | wdir="$1" 176 | while [ "$wdir" != '/' ] ; do 177 | if [ -d "$wdir"/.mvn ] ; then 178 | basedir=$wdir 179 | break 180 | fi 181 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 182 | if [ -d "${wdir}" ]; then 183 | wdir=`cd "$wdir/.."; pwd` 184 | fi 185 | # end of workaround 186 | done 187 | echo "${basedir}" 188 | } 189 | 190 | # concatenates all lines of a file 191 | concat_lines() { 192 | if [ -f "$1" ]; then 193 | echo "$(tr -s '\n' ' ' < "$1")" 194 | fi 195 | } 196 | 197 | BASE_DIR=`find_maven_basedir "$(pwd)"` 198 | if [ -z "$BASE_DIR" ]; then 199 | exit 1; 200 | fi 201 | 202 | ########################################################################################## 203 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 204 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 205 | ########################################################################################## 206 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 207 | if [ "$MVNW_VERBOSE" = true ]; then 208 | echo "Found .mvn/wrapper/maven-wrapper.jar" 209 | fi 210 | else 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 213 | fi 214 | if [ -n "$MVNW_REPOURL" ]; then 215 | jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" 216 | else 217 | jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" 218 | fi 219 | while IFS="=" read key value; do 220 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 221 | esac 222 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 223 | if [ "$MVNW_VERBOSE" = true ]; then 224 | echo "Downloading from: $jarUrl" 225 | fi 226 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 227 | if $cygwin; then 228 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 229 | fi 230 | 231 | if command -v wget > /dev/null; then 232 | if [ "$MVNW_VERBOSE" = true ]; then 233 | echo "Found wget ... using wget" 234 | fi 235 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 236 | wget "$jarUrl" -O "$wrapperJarPath" 237 | else 238 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" 239 | fi 240 | elif command -v curl > /dev/null; then 241 | if [ "$MVNW_VERBOSE" = true ]; then 242 | echo "Found curl ... using curl" 243 | fi 244 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 245 | curl -o "$wrapperJarPath" "$jarUrl" -f 246 | else 247 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 248 | fi 249 | 250 | else 251 | if [ "$MVNW_VERBOSE" = true ]; then 252 | echo "Falling back to using Java to download" 253 | fi 254 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 255 | # For Cygwin, switch paths to Windows format before running javac 256 | if $cygwin; then 257 | javaClass=`cygpath --path --windows "$javaClass"` 258 | fi 259 | if [ -e "$javaClass" ]; then 260 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 261 | if [ "$MVNW_VERBOSE" = true ]; then 262 | echo " - Compiling MavenWrapperDownloader.java ..." 263 | fi 264 | # Compiling the Java class 265 | ("$JAVA_HOME/bin/javac" "$javaClass") 266 | fi 267 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 268 | # Running the downloader 269 | if [ "$MVNW_VERBOSE" = true ]; then 270 | echo " - Running MavenWrapperDownloader.java ..." 271 | fi 272 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 273 | fi 274 | fi 275 | fi 276 | fi 277 | ########################################################################################## 278 | # End of extension 279 | ########################################################################################## 280 | 281 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 282 | if [ "$MVNW_VERBOSE" = true ]; then 283 | echo $MAVEN_PROJECTBASEDIR 284 | fi 285 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 286 | 287 | # For Cygwin, switch paths to Windows format before running java 288 | if $cygwin; then 289 | [ -n "$M2_HOME" ] && 290 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 291 | [ -n "$JAVA_HOME" ] && 292 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 293 | [ -n "$CLASSPATH" ] && 294 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 295 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 296 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 297 | fi 298 | 299 | # Provide a "standardized" way to retrieve the CLI args that will 300 | # work with both Windows and non-Windows executions. 301 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 302 | export MAVEN_CMD_LINE_ARGS 303 | 304 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 305 | 306 | exec "$JAVACMD" \ 307 | $MAVEN_OPTS \ 308 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 309 | "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 310 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 311 | -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM http://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven2 Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 50 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" 124 | 125 | FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 162 | if ERRORLEVEL 1 goto error 163 | goto end 164 | 165 | :error 166 | set ERROR_CODE=1 167 | 168 | :end 169 | @endlocal & set ERROR_CODE=%ERROR_CODE% 170 | 171 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 172 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 173 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 174 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 175 | :skipRcPost 176 | 177 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 178 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 179 | 180 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 181 | 182 | exit /B %ERROR_CODE% 183 | -------------------------------------------------------------------------------- /pmdruleset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | src/test/java.* 5 | target.* 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.jcabi 8 | parent 9 | 0.49.5 10 | 11 | com.integralblue 12 | log4jdbc-spring-boot-starter 13 | 2.0.0-SNAPSHOT 14 | Starter for using Log4jdbc with Spring Boot 15 | Starter for using Log4jdbc with Spring Boot 16 | 17 | 18 | Apache License, Version 2.0 19 | https://www.apache.org/licenses/LICENSE-2.0.txt 20 | repo 21 | 22 | 23 | https://github.com/candrews/log4jdbc-spring-boot-starter 24 | 25 | GitHub 26 | https://github.com/candrews/log4jdbc-spring-boot-starter/issues 27 | 28 | 29 | travis 30 | https://travis-ci.org/candrews/log4jdbc-spring-boot-starter 31 | 32 | 33 | https://github.com/candrews/log4jdbc-spring-boot-starter 34 | scm:git:https://github.com/candrews/log4jdbc-spring-boot-starter.git 35 | scm:git:git@github.com:candrews/log4jdbc-spring-boot-starter.git 36 | 37 | 38 | 39 | Craig Andrews 40 | candrews@integralblue.com 41 | candrews 42 | https://candrews.integralblue.com 43 | -5 44 | 45 | developer 46 | 47 | 48 | 49 | 50 | 51 | 1.16 52 | 5.1.8.RELEASE 53 | 2.1.6.RELEASE 54 | 1.7.26 55 | 1.8 56 | 1.8 57 | 58 | 59 | 60 | 61 | org.springframework 62 | spring-context 63 | ${spring.version} 64 | compile 65 | 66 | 67 | org.springframework.boot 68 | spring-boot-autoconfigure 69 | ${spring-boot.version} 70 | 71 | 72 | org.springframework.boot 73 | spring-boot-configuration-processor 74 | ${spring-boot.version} 75 | true 76 | 77 | 78 | org.slf4j 79 | slf4j-api 80 | ${slf4j.version} 81 | 82 | 83 | org.bgee.log4jdbc-log4j2 84 | log4jdbc-log4j2-jdbc4.1 85 | ${log4jdbc.version} 86 | 87 | 88 | 89 | 90 | 91 | 92 | org.codehaus.mojo 93 | animal-sniffer-maven-plugin 94 | 1.18 95 | 96 | 97 | test 98 | 99 | check 100 | 101 | 102 | 103 | 104 | 105 | org.codehaus.mojo.signature 106 | java18 107 | 1.0 108 | 109 | 110 | 111 | 112 | org.apache.maven.plugins 113 | maven-pmd-plugin 114 | 3.6 115 | 116 | 117 | net.sourceforge.pmd 118 | pmd-core 119 | 5.5.1 120 | 121 | 122 | net.sourceforge.pmd 123 | pmd-java 124 | 5.5.1 125 | 126 | 127 | 128 | true 129 | true 130 | ${maven.compiler.target} 131 | ${project.build.sourceEncoding} 132 | 133 | ${basedir}/pmdruleset.xml 134 | 135 | 136 | 137 | 138 | compile 139 | 140 | 141 | check 142 | 143 | 144 | 145 | 146 | 147 | org.apache.maven.plugins 148 | maven-checkstyle-plugin 149 | 2.17 150 | 151 | 152 | validate-fatal 153 | validate 154 | 155 | src/checkstyle/checkstyle.xml 156 | src/checkstyle/checkstyle-header.txt 157 | UTF-8 158 | true 159 | true 160 | false 161 | 162 | 163 | check 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 173 | 174 | org.eclipse.m2e 175 | lifecycle-mapping 176 | 1.0.0 177 | 178 | 179 | 180 | 181 | 182 | 183 | org.codehaus.mojo 184 | 185 | 186 | buildnumber-maven-plugin 187 | 188 | 189 | [1.4,) 190 | 191 | 192 | 193 | create-timestamp 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | -------------------------------------------------------------------------------- /pubring.gpg.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | 3 | hQEMA5qETcGag5w6AQf+Lj5AXbQCw4aH0uurUcL0iA+CO2yB/t0ORjAnA2aBLtOp 4 | I63k5eInZQn3Mmz0IwxBPTCCC/BLYrQEr4uSl/YI+bC5JDFneR50YQZmfIY1cwoP 5 | UcRZm+Yu/W5PMxYj9Fvv780ms8qY1raB3VJdVu9+EK9NerbuwfU7kKqYcTCfpOmv 6 | FUrJjlngh9FTGESzXEPmJRzCmSrapLUzUo5w7z3Q97vwenDNqmZbUUuGkWoF0flX 7 | ueNmhWXLGO5GdfwQ9UsLz6k+mSEKyEpqpQCvpxg0ui0we8TKunkjOhN8pxAlf9cK 8 | It2s6EmmpD50WT6d8ILR46tTFnpnaheK41vW99Vp39LrAWyNcsZBUc0pLw79YqjB 9 | 0G4YraNQhScB8TlEoblMuvLEyYGuOoWz/Omg6SBh4/bjjwzfImjzO3mzWmopJM46 10 | V+atNjb98fykl7PEwXEjKmdG75Izg8lJAko5kxPwtKOvAX1MHNszqFJPVjj1AsHm 11 | N/gx8PcmAORfBvFNs1auBsHXlIthwYakAyeCZtGw1cRlYSfOXqdI6VdQSEWl+dUI 12 | wE9v3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hiGtwSxVGVi2ag8m54EzaQIhMR2uA6oy7IDigrPm6bM/ 60 | szLWysppV6o944txETVa49Ymk8bzRd8NNg9MIgK5dHluOm3/r8r0KHO7j75w4XlO 61 | XRgbu62iobWdmY1rOgQ= 62 | =0OUk 63 | -----END PGP MESSAGE----- 64 | -------------------------------------------------------------------------------- /secring.gpg.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | 3 | hQEMA5qETcGag5w6AQf/UBz3oXEEydIIfLShF8Mq8OKilC7k4a5nfmJrB1LiPDCH 4 | rfwX0bWs6ZKX2+TX5NJ4eVSkI80kZ15fQ5negdjHC1a7OCAD4UqwA6YNWC+U12QM 5 | tJjXEsEX5DwH1FhxwqNDxHlNiokzbnK0kNM2lnugRTK61uVtJ94gFIlFRZJIiP0Y 6 | B9Yr4h/oWx2RXOzzR4o67nXft0CX2M3MbYeKktfUiof5j/2F1qyOOJQswbJThc1U 7 | MN0gLMOpY7hby3bd7tjHQPxNkL7Am082vHJcE1FJL0XGvibS8HWTG5epXZ1CnYAr 8 | eaUHFWKRmCMM8MzFl2+96KmiEqFZheK1Py93bE22bNLsAVTgTdjbHpLK13KCyIwh 9 | wPF759U9J3jab2triWWy0rdwtbYlwNEbF1oOkmr/TBVX0r2dtp9SfVzz86OtI+y4 10 | oGdEoA+iRvHZ//daLhLv0TzB3v3bskZsLTrOU7R++NJhZHkAt3xnf9hOKuv5vhEB 11 | MmXWsAhJN9J8HiHxDknaufbTtXoWDGOygZIvgGpNz8pUz5wud15GER/9vyOW8Frt 12 | pijAXlSRi6ynjdy/iOoEj+u0qHuhynFwBFoVB4tRTeKQp9ea+T5fbABK0uK935TQ 13 | PRtblBYhHRxfqVVwpTq18U7wEme48hnY6j0hKo8CGIOtSMPtL1uP2ZIlaKM7QPX0 14 | mjNHAb8ZGWcG+m0GyTF2ilVLYO0O74CelprQljFkIPzQ1Shc3I8v++h7lm4W33Vw 15 | cv+rfNAoDCj/G+GLz43xHP8N1waqR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ZR+jytjWYwyF7mybf72hRv59ldgbpoW7FscoLrfxUfS2upW7I983qZqU+lF1Mw8h 111 | 7AFySjcXhdAfn+cuZ4DgIPT6DhmhkeEmrtTyIq/gVSqajyDPM5d5TrW2Bsj7tlQ/ 112 | j9O+YKqgsfREVZsdBQFELw2MimrEhkynzuZIcxdd5OSThqxptv8HoZvLxlATdvUH 113 | TboBcXixTWLuQL9DzTpZmXYM1ZZba/aXs0Ykpv6pLwufwss4gXPNyZF/mizlFTvW 114 | vdqLXOU+lv5s+IjBS2ZT59xGQCFNMjD8pQhnTZ+VnRJdyPOmp9c9U2w3MYqHui0Q 115 | QME5/RXEsHjd8OijESLvV0o3jsZKKctlIHbwXrScFodSQ2ZaFxJ0bO3CDRqDG/aK 116 | CfKGe8pXUa5uADk4iDrc8PlB6GTxn/DwWLetwFT7NZTtbRt37iTaFNB3iglgtwcN 117 | 2vFMhcWzfjo9sXFWHSLwQwSrz3PBHVBY58Z/YHOd+wEZNFZ11uDXijrTlD/p6tdD 118 | qmBKDgeucMAsMDs/qBWCL30= 119 | =KFAL 120 | -----END PGP MESSAGE----- 121 | -------------------------------------------------------------------------------- /settings.xml.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | 3 | hQEMA5qETcGag5w6AQf/TPPrc57C57+1RMCyZWeFFEz0W5/YYfHlgi0S70wvoDHG 4 | 74J7YriU+uvrhNOd9jk4lXjyQ/4Y/7Juv3u8wTCSB+VkPSxmF+BxqXuvj9vJygvq 5 | vu37rvxMXGl4RW5dxOPv6ep4b8WkL9maOwkPINm87GrCBNU+RjsJBfxspXBIGNcx 6 | FDUZmyrDtomwIR0yFUNLWeLUNAhrl9L98//cJeocSgASSXhZrJGrLzhvWH8n3rAW 7 | GjW/HooM+MmCplfj6bE5mfeM3UtrH1DxJe6wd2SmHn3Br+g3BaTYfhPIpbC2CHV/ 8 | riaZbr0mIaSADJqDd+uCwpPvps9flrLjh7tvGiin2dLA5gFZj0JNd0DLPkIawuaZ 9 | H270kcWSLGg572iwpLTqqMwJjv1f36S5WqjvrjWq3T+TGZ6/Yklo3fF2i4nzjSxh 10 | ZP9+IL46XjxGS7BgTPO3vKOiQR57Xuu5+1lpGyvEmkRuGp5a6gW/F2+FnDKYuISn 11 | m3BadssGeNRDCGd6Yg711c2oQlrcQE02bz5inbu8Po3Hod57GdyLBwLEfyQLTMMc 12 | +J0HNqL0ip5zkMAHvlrJPodywnF4tLF/eNF4L73/li3FYn1AO0FZ4s8y3ke7GLCG 13 | 56CUiNJPBaE6MXNZZOVE3cLNH/YCU3KsW9m901v9BkytDof9aE2o7BztAxi4Pn2/ 14 | UXLxTDPPoroyLbLQg1F/+/bVNiQvESo6vWShZzgw5eqSi2HhAxSDg61rpRZeW6Sn 15 | Bpfadu6erLdrXzjHTcccsnzDN20edcOV4/OAHS5f4ZZGQ51b1ygMbsQPp2A+cdmT 16 | xV9j4J+HcwPAXti0BbPiVNy2cJbGRzMCruE34jSF3WAfyasdNJZfjhDhcDNji7BQ 17 | HnwtHiHIXglUUCnHfv8FVlLsU5Zu1lK1 18 | =roKq 19 | -----END PGP MESSAGE----- 20 | -------------------------------------------------------------------------------- /src/checkstyle/checkstyle-header.txt: -------------------------------------------------------------------------------- 1 | ^\Q/*\E$ 2 | ^\Q * Copyright \E2012-20\d\d\Q the original author or authors.\E$ 3 | ^\Q *\E$ 4 | ^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$ 5 | ^\Q * you may not use this file except in compliance with the License.\E$ 6 | ^\Q * You may obtain a copy of the License at\E$ 7 | ^\Q *\E$ 8 | ^\Q * http://www.apache.org/licenses/LICENSE-2.0\E$ 9 | ^\Q *\E$ 10 | ^\Q * Unless required by applicable law or agreed to in writing, software\E$ 11 | ^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$ 12 | ^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$ 13 | ^\Q * See the License for the specific language governing permissions and\E$ 14 | ^\Q * limitations under the License.\E$ 15 | ^\Q */\E$ 16 | ^$ 17 | ^.*$ 18 | -------------------------------------------------------------------------------- /src/checkstyle/checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 136 | 137 | 138 | 139 | 140 | 141 | 143 | 144 | 145 | 146 | 147 | 148 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /src/main/java/com/integralblue/log4jdbc/spring/Log4jdbcAutoConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2016 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.integralblue.log4jdbc.spring; 18 | 19 | import net.sf.log4jdbc.sql.jdbcapi.DataSourceSpy; 20 | 21 | import org.springframework.boot.autoconfigure.AutoConfigureAfter; 22 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 23 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; 24 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; 25 | import org.springframework.context.annotation.Bean; 26 | import org.springframework.context.annotation.Configuration; 27 | 28 | /** 29 | * {@link EnableAutoConfiguration Auto-configuration} for log4jdbc. 30 | * 31 | * @author Craig Andrews 32 | */ 33 | @Configuration 34 | @ConditionalOnClass(DataSourceSpy.class) 35 | @AutoConfigureAfter(DataSourceAutoConfiguration.class) 36 | @SuppressWarnings("checkstyle:hideutilityclassconstructor") 37 | public class Log4jdbcAutoConfiguration { 38 | @Bean 39 | public static Log4jdbcBeanPostProcessor log4jdbcBeanPostProcessor() { 40 | return new Log4jdbcBeanPostProcessor(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/integralblue/log4jdbc/spring/Log4jdbcBeanPostProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2016 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.integralblue.log4jdbc.spring; 18 | 19 | import javax.annotation.PostConstruct; 20 | import javax.sql.DataSource; 21 | 22 | import net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator; 23 | import net.sf.log4jdbc.sql.jdbcapi.DataSourceSpy; 24 | 25 | import org.springframework.beans.BeansException; 26 | import org.springframework.beans.factory.annotation.Autowired; 27 | import org.springframework.beans.factory.config.BeanPostProcessor; 28 | import org.springframework.core.env.Environment; 29 | 30 | /** 31 | * A {@link BeanPostProcessor} implementation that sets up log4jdbc logging. 32 | * To do so, it: 33 | *
    34 | *
  • Copies log4jdbc configuration properties from the Spring {@link Environment} to system properties (log4jdbc only reads system properties)
  • 35 | *
  • Wraps {@link DataSource} beans with {@link DataSourceSpy}
  • 36 | *
37 | * 38 | * @author Craig Andrews 39 | * @see net.sf.log4jdbc.Properties 40 | */ 41 | public class Log4jdbcBeanPostProcessor implements BeanPostProcessor { 42 | @Autowired 43 | private Environment environment; 44 | 45 | private static final String[] PROPERTIES_TO_COPY = { 46 | "log4jdbc.log4j2.properties.file", 47 | "log4jdbc.debug.stack.prefix", 48 | "log4jdbc.sqltiming.warn.threshold", 49 | "log4jdbc.sqltiming.error.threshold", 50 | "log4jdbc.dump.booleanastruefalse", 51 | "log4jdbc.dump.fulldebugstacktrace", 52 | "log4jdbc.dump.sql.maxlinelength", 53 | "log4jdbc.statement.warn", 54 | "log4jdbc.dump.sql.select", 55 | "log4jdbc.dump.sql.insert", 56 | "log4jdbc.dump.sql.update", 57 | "log4jdbc.dump.sql.delete", 58 | "log4jdbc.dump.sql.create", 59 | "log4jdbc.dump.sql.addsemicolon", 60 | "log4jdbc.auto.load.popular.drivers", 61 | "log4jdbc.drivers", 62 | "log4jdbc.trim.sql", 63 | "log4jdbc.trim.sql.extrablanklines", 64 | "log4jdbc.suppress.generated.keys.exception", 65 | "log4jdbc.log4j2.properties.file", 66 | }; 67 | 68 | @Override 69 | public Object postProcessBeforeInitialization(final Object bean, final String beanName) throws BeansException { 70 | if (bean instanceof DataSource) { 71 | return new DataSourceSpy((DataSource) bean); 72 | } 73 | else { 74 | return bean; 75 | } 76 | } 77 | 78 | @Override 79 | public Object postProcessAfterInitialization(final Object bean, final String beanName) throws BeansException { 80 | return bean; 81 | } 82 | 83 | @PostConstruct 84 | public void postConstruct() { 85 | // Log4jdbc only reads configuration from system properties, so copy relevant environment property to system properties 86 | // See net.sf.log4jdbc.Properties.getProperties() 87 | for (final String property : PROPERTIES_TO_COPY) { 88 | if (this.environment.containsProperty(property)) { 89 | System.setProperty(property, this.environment.getProperty(property)); 90 | } 91 | } 92 | // Use slf4j by default. 93 | // Most users will have slf4j configured (because Spring does that by default) and they won't be using log4j (which is the log4jdbc default) 94 | System.setProperty("log4jdbc.spylogdelegator.name", this.environment.getProperty("log4jdbc.spylogdelegator.name", Slf4jSpyLogDelegator.class.getName())); 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring-configuration-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "name": "log4jdbc.drivers", 5 | "type": "java.util.list>", 6 | "description": "One or more fully qualified class names for JDBC drivers that log4jdbc should load and wrap. This option is not normally needed because most popular JDBC drivers are already loaded by default. This should be used if one or more additional JDBC drivers that (log4jdbc doesn't already wrap) needs to be included." 7 | }, 8 | { 9 | "name": "log4jdbc.auto.load.popular.drivers", 10 | "type": "java.lang.Boolean", 11 | "description": "Automatically load popular drivers. If this is false, you must set the log4jdbc.drivers property in order to load the driver(s) you want.", 12 | "defaultValue": true 13 | }, 14 | { 15 | "name": "log4jdbc.debug.stack.prefix", 16 | "type": "java.util.regex.Pattern", 17 | "description": "A REGEX matching the package name of your application. The call stack will be searched down to the first occurrence of a class that has the matching REGEX. If this is not set, the actual class that called into log4jdbc is used in the debug output (in many cases this will be a connection pool class). For example, setting a system property such as this: -Dlog4jdbc.debug.stack.prefix=^com.mycompany.myapp.* would cause the call stack to be searched for the first call that came from code in the com.mycompany.myapp package or below, thus if all of your sql generating code was in code located in the com.mycompany.myapp package or any subpackages, this would be printed in the debug information, rather than the package name for a connection pool, object relational system, etc. Please note that the behavior of this property has changed as compared to the standard log4jdbc implementation. This property is now a REGEX, instead of being just the package prefix of the stack trace. So, for instance, if you want to target the prefix org.mypackage, the value of this property should be: ^org.mypackage.*." 18 | }, 19 | { 20 | "name": "log4jdbc.sqltiming.warn.threshold", 21 | "type": "java.lang.Long", 22 | "description": "Millisecond time value. Causes SQL that takes the number of milliseconds specified or more time to execute to be logged at the warning level in the sqltiming log. Note that the sqltiming log must be enabled at the warn log level for this feature to work. Also the logged output for this setting will log with debug information that is normally only shown when the sqltiming log is enabled at the debug level. This can help you to more quickly find slower running SQL without adding overhead or logging for normal running SQL that executes below the threshold level (if the logging level is set appropriately)." 23 | }, 24 | { 25 | "name": "log4jdbc.sqltiming.error.threshold", 26 | "type": "java.lang.Long", 27 | "description": "Millisecond time value. Causes SQL that takes the number of milliseconds specified or more time to execute to be logged at the error level in the sqltiming log. Note that the sqltiming log must be enabled at the error log level for this feature to work. Also the logged output for this setting will log with debug information that is normally only shown when the sqltiming log is enabled at the debug level. This can help you to more quickly find slower running SQL without adding overhead or logging for normal running SQL that executes below the threshold level (if the logging level is set appropriately.)" 28 | }, 29 | { 30 | "name": "log4jdbc.dump.booleanastruefalse", 31 | "type": "java.lang.Boolean", 32 | "description": "When dumping boolean values in SQL, dump them as 'true' or 'false'. If this option is not set, they will be dumped as 1 or 0 as many databases do not have a boolean type, and this allows for more portable sql dumping.", 33 | "defaultValue": false 34 | }, 35 | { 36 | "name": "log4jdbc.dump.sql.maxlinelength", 37 | "type": "java.lang.Integer", 38 | "description": "When dumping SQL, if this is greater than 0, than the dumped SQL will be broken up into lines that are no longer than this value. Set this value to 0 if you don't want log4jdbc to try and break the SQL into lines this way. In future versions of log4jdbc, this will probably default to 0.", 39 | "defaultValue": 90 40 | }, 41 | { 42 | "name": "log4jdbc.dump.fulldebugstacktrace", 43 | "type": "java.lang.Boolean", 44 | "description": "If dumping in debug mode, dump the full stack trace. This will result in EXTREMELY voluminous output, but can be very useful under some circumstances when trying to track down the call chain for generated SQL.", 45 | "defaultValue": false 46 | }, 47 | { 48 | "name": "log4jdbc.dump.sql.select", 49 | "type": "java.lang.Boolean", 50 | "description": "Set this to false to suppress SQL select statements in the output. Note that if you use the Log4j 2 logger, it is also possible to control select statements output via the marker LOG4JDBC_SELECT. The use of this property prepend the use of the marker.", 51 | "defaultValue": true 52 | }, 53 | { 54 | "name": "log4jdbc.dump.sql.insert", 55 | "type": "java.lang.Boolean", 56 | "description": "Set this to false to suppress SQL insert statements in the output. Note that if you use the Log4j 2 logger, it is also possible to control insert statements output via the marker. The use of this property prepend the use of the marker.", 57 | "defaultValue": true 58 | }, 59 | { 60 | "name": "log4jdbc.dump.sql.update", 61 | "type": "java.lang.Boolean", 62 | "description": "Set this to false to suppress SQL update statements in the output. Note that if you use the Log4j 2 logger, it is also possible to control update statements output via the marker LOG4JDBC_UPDATE. The use of this property prepend the use of the marker.", 63 | "defaultValue": true 64 | }, 65 | { 66 | "name": "log4jdbc.dump.sql.delete", 67 | "type": "java.lang.Boolean", 68 | "description": "Set this to false to suppress SQL delete statements in the output. Note that if you use the Log4j 2 logger, it is also possible to control delete statements output via the marker LOG4JDBC_DELETE. The use of this property prepend the use of the marker.", 69 | "defaultValue": true 70 | }, 71 | { 72 | "name": "log4jdbc.dump.sql.create", 73 | "type": "java.lang.Boolean", 74 | "description": "Set this to false to suppress SQL create statements in the output. Note that if you use the Log4j 2 logger, it is also possible to control create statements output via the marker LOG4JDBC_CREATE. The use of this property prepend the use of the marker.", 75 | "defaultValue": true 76 | }, 77 | { 78 | "name": "log4jdbc.dump.sql.addsemicolon", 79 | "type": "java.lang.Boolean", 80 | "description": "Set this to true to add an extra semicolon to the end of SQL in the output. This can be useful when you want to generate SQL from a program with log4jdbc in order to create a script to feed back into a database to run at a later time.", 81 | "defaultValue": false 82 | }, 83 | { 84 | "name": "log4jdbc.spylogdelegator.name", 85 | "type": "java.lang.Class", 86 | "description": "The qualified class name of the SpyLogDelegator to use. Note that if you want to use log4jdbc-log4j2 with Log4j 2 rather than SLF4J, you must set this property to: net.sf.log4jdbc.log.log4j2.Log4j2SpyLogDelegator. Note that the default in this Starter is to use SLF4J which is different from the log4jdbc library's default.", 87 | "defaultValue": "net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator" 88 | }, 89 | { 90 | "name": "log4jdbc.statement.warn", 91 | "type": "java.lang.Boolean", 92 | "description": "Set this to true to display warnings (Why would you care?) in the log when Statements are used in the log.", 93 | "defaultValue": false 94 | }, 95 | { 96 | "name": "log4jdbc.trim.sql", 97 | "type": "java.lang.Boolean", 98 | "description": "Set this to false to not trim the logged SQL.", 99 | "defaultValue": true 100 | }, 101 | { 102 | "name": "log4jdbc.trim.sql.extrablanklines", 103 | "type": "java.lang.Boolean", 104 | "description": "Set this to false to not trim extra blank lines in the logged SQL (by default, when more than one blank line in a row occurs, the contiguous lines are collapsed to just one blank line.)", 105 | "defaultValue": true 106 | }, 107 | { 108 | "name": "log4jdbc.suppress.generated.keys.exception", 109 | "type": "java.lang.Boolean", 110 | "description": "Set to true to ignore any exception produced by the method, Statement.getGeneratedKeys()", 111 | "defaultValue": false 112 | }, 113 | { 114 | "name": "log4jdbc.log4j2.properties.file", 115 | "description": "Name of the property file to use", 116 | "type": "org.springframework.core.io.Resource" 117 | } 118 | ] 119 | } 120 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.integralblue.log4jdbc.spring.Log4jdbcAutoConfiguration 2 | 3 | --------------------------------------------------------------------------------