Browse Source

Merge branch 'master' of https://github.com/decebals/pf4j

pull/3/head
Decebal Suiu 11 years ago
parent
commit
0cb9b3b986
  1. 5
      README.md
  2. 15
      demo/app/src/main/resources/log4j.properties
  3. 8
      demo/app/src/main/resources/logging.properties

5
README.md

@ -102,7 +102,10 @@ You can define an extension point in your application using **ExtensionPoint** i
}
Another important internal component is **ExtensionFinder** that describes how the plugin manager discovers extensions for the extensions points.
**DefaultExtensionFinder** looks up extensions using **Extension** annotation. You can control extension instance creation overriding `createExtensionFactory` method from DefaultExtensionFinder.
**DefaultExtensionFinder** looks up extensions using **Extension** annotation.
DefaultExtensionFinder looks up extensions in all extensions index files `META-INF/extensions.idx`. PF4J uses Java Annotation Processing to process at compile time all classes annotated with @Extension and to produce the extensions index file.
You can control extension instance creation overriding `createExtensionFactory` method from DefaultExtensionFinder.
public class WelcomePlugin extends Plugin {

15
demo/app/src/main/resources/log4j.properties

@ -1,6 +1,15 @@
log4j.rootLogger=DEBUG,Console
log4j.rootLogger=DEBUG, Console
#
# PF4J log
#
log4j.logger.ro.fortsoft.pf4j=DEBUG, Console
log4j.additivity.ro.fortsoft.pf4j=false
#
# Appenders
#
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.conversionPattern=%-5p - %-32.32c{1} - %m\n
#log4j.appender.Console.layout.conversionPattern=%-5p - %-32.32c{1} - %m\n
log4j.appender.Console.layout.ConversionPattern=%d %p %c - %m%n

8
demo/app/src/main/resources/logging.properties

@ -1,8 +0,0 @@
#handlers = java.util.logging.ConsoleHandler
handlers = org.slf4j.bridge.SLF4JBridgeHandler
# Set the default logging level for the root logger
.level = ALL
# Set the default formatter for new ConsoleHandler instances
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
Loading…
Cancel
Save