diff --git a/README.md b/README.md new file mode 100644 index 0000000..eb4383b --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +This is a reimplementation of the JBoss Logmanager. + +The implementation purpose of this project is to serve as a replacement for java.util.logging.Logmanager by defining java.util.logging.manager property on the java command line to overcome the weaknesses and strange defaults. + +One notable weakness of the original JUL LogManager is that all loggers can be reset by any application. This LogManannger can not be modified after its initialization, a reset is simply ignored. + +The following attributes of the original JBoss implementation have been changed: + +- build tool is Grade +- new package org.xbib +- the package structure has been reorganized +- removed all license headers and authorships for clarity, this source code does not claim to be the original one +- Usage of the Java Security Manager have been removed +- Usage and declaration of deprecated code has been removed to the possible minimum +- Usage of asserts have been removed (checks are always active) +- Dependencies to external resources have been resolved, there are no external dependencies any more, making this implementation a single artifact +- JPMS module description has been added +- JSON logging has been removed +- Formatters have been moved to an extension package to reduce the size of the required artifact +- a new default formatter always adds the Java thread name in a single line formatted log message +- it is possible to override the properties in the logging.properties resource file by a system property +- there are just two adapters for redirecting log4j2 and slf4j to this log manager implementation + +Usage + +Define a Java command line like + + java [...] -Djava.util.logging.manager=org.xbib.logging.LogManager [...] + +and add the artifact to your project + +Notes + +The integrations tests are disabled and need to be repaired. + +See NOTICE.txt for notes about provenance. + +The license is Apache 2.0 diff --git a/build.gradle b/build.gradle index 59c3201..d61e05e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,3 @@ - plugins { id 'pmd' id 'maven-publish' @@ -15,24 +14,24 @@ wrapper { } ext { - user = 'joerg' - name = 'logging' + name = rootProject.name description = 'Logging for Java 21+, a reimplementation of JBoss LogManager' inceptionYear = '2024' + user = 'joerg' url = 'https://xbib.org/' + user + '/' + name - scmUrl = 'https://xbib.org/' + user + '/' + name - scmConnection = 'scm:git:git://xbib.org/' + user + '/' + name + '.git' + scmUrl = url + scmConnection = 'scm:git:' + url + '.git' scmDeveloperConnection = 'scm:git:ssh://forgejo@xbib.org:' + user + '/' + name + '.git' - issueManagementSystem = 'Github' + issueManagementSystem = 'Forgejo' issueManagementUrl = ext.scmUrl + '/issues' licenseName = 'The Apache License, Version 2.0' licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' } subprojects { + apply from: rootProject.file('gradle/compile/java.gradle') apply from: rootProject.file('gradle/repositories/artifactory.gradle') apply from: rootProject.file('gradle/repositories/forgejo.gradle') - apply from: rootProject.file('gradle/compile/java.gradle') apply from: rootProject.file('gradle/test/junit5.gradle') apply from: rootProject.file('gradle/quality/pmd.gradle') apply from: rootProject.file('gradle/publish/maven.gradle') @@ -41,4 +40,4 @@ apply from: rootProject.file('gradle/quality/cyclonedx.gradle') apply from: rootProject.file('gradle/quality/osv-scanner.gradle') apply from: rootProject.file('gradle/publish/xbib/forgejo.gradle') apply from: rootProject.file('gradle/publish/hbz/artifactory.gradle') -//apply from: rootProject.file('gradle/publish/maven-central/sonatype.gradle') +apply from: rootProject.file('gradle/publish/maven-central/sonatype.gradle') diff --git a/gradle/compile/groovy.gradle b/gradle/compile/groovy.gradle deleted file mode 100644 index 1abf883..0000000 --- a/gradle/compile/groovy.gradle +++ /dev/null @@ -1,34 +0,0 @@ -apply plugin: 'groovy' - -dependencies { - implementation "org.codehaus.groovy:groovy:${project.property('groovy.version')}:indy" -} - -compileGroovy { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 -} - -compileTestGroovy { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 -} - -tasks.withType(GroovyCompile) { - options.compilerArgs - if (!options.compilerArgs.contains("-processor")) { - options.compilerArgs << '-proc:none' - } - groovyOptions.optimizationOptions.indy = true -} - -task groovydocJar(type: Jar, dependsOn: 'groovydoc') { - from groovydoc.destinationDir - archiveClassifier.set('javadoc') -} - -configurations.all { - resolutionStrategy { - force "org.codehaus.groovy:groovy:${project.property('groovy.version')}:indy" - } -} diff --git a/gradle/quality/osv-scanner.gradle b/gradle/quality/osv-scanner.gradle index a88658c..ccd89cd 100644 --- a/gradle/quality/osv-scanner.gradle +++ b/gradle/quality/osv-scanner.gradle @@ -3,4 +3,7 @@ apply plugin: 'com.fizzpod.osv-scanner' osvScanner { format = "json" sbom = rootProject.file('build/reports/bom.json') + } + +osvSbom.dependsOn(osvInstall, cyclonedxBom)