Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move configuration format converter from log4j-1.2-api #93

Draft
wants to merge 84 commits into
base: main
Choose a base branch
from

Commits on Apr 1, 2024

  1. Make new home for Log4j2

    git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk@1241269 13f79535-47bb-0310-9956-ffa450edef68
    rgoers authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    b706c31 View commit details
    Browse the repository at this point in the history
  2. [LOG4J2-63] Support configuration from version 1.x log4j.properties. A

    start, with the ConsoleAppender.
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    00ff9c3 View commit details
    Browse the repository at this point in the history
  3. [LOG4J2-63] Support configuration from version 1.x log4j.properties.

    Partial support for XML and HTML layouts (defaults only).
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    7993d6b View commit details
    Browse the repository at this point in the history
  4. [LOG4J2-63] Support configuration from version 1.x log4j.properties.

    Partial support for TTCC layout (defaults only).
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    31de8a2 View commit details
    Browse the repository at this point in the history
  5. [LOG4J2-63] Support configuration from version 1.x log4j.properties.

    Partial support for EnhancedPatternLayout (defaults only).
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    49c625e View commit details
    Browse the repository at this point in the history
  6. [LOG4J2-63] Support configuration from version 1.x log4j.properties.

    Complete TTCC layout.
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    46e6554 View commit details
    Browse the repository at this point in the history
  7. Add TODO

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    d32aee1 View commit details
    Browse the repository at this point in the history
  8. Fix Layouts

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    68bae46 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2f49b54 View commit details
    Browse the repository at this point in the history
  10. Add TODOs

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    c28ad40 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    930ae56 View commit details
    Browse the repository at this point in the history
  12. Fix comments

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    a567360 View commit details
    Browse the repository at this point in the history
  13. Ported Log4j 1's XMLLayout

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    087fd9e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    42fe672 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    2d5a412 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    be09fdb View commit details
    Browse the repository at this point in the history
  17. Fix comment

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    7cb262a View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    d54e9c4 View commit details
    Browse the repository at this point in the history
  19. Support %ndc in PatternLayout

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    5d4e01a View commit details
    Browse the repository at this point in the history
  20. Fix name of console appender

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    6db69ac View commit details
    Browse the repository at this point in the history
  21. Fix AppenderRef

    Mikael Ståldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    58f0370 View commit details
    Browse the repository at this point in the history
  22. Remove TTCCLayout and use PatternLayout instead

    Mikael Ståldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    fb98dcb View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    8727a32 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    5699c11 View commit details
    Browse the repository at this point in the history
  25. Close input stream when done

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    41efb61 View commit details
    Browse the repository at this point in the history
  26. First commit for branch for [LOG4J2-1547]

    The Core AbstractConfiguration should track its LoggerContext.
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    fdd9790 View commit details
    Browse the repository at this point in the history
  27. Code clean-up

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    03a5a9e View commit details
    Browse the repository at this point in the history
  28. Support FileAppender

    mikaelstaldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    a66429d View commit details
    Browse the repository at this point in the history
  29. Use final.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    54bd048 View commit details
    Browse the repository at this point in the history
  30. Proof-of-concept for Log4j 1.x config conversion

    Mikael Ståldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    1a20761 View commit details
    Browse the repository at this point in the history
  31. Fix error handling in Log4j 1 configuration

    Mikael Ståldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    4d2caf0 View commit details
    Browse the repository at this point in the history
  32. Format nit.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    016e894 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    844685d View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    d2eed9f View commit details
    Browse the repository at this point in the history
  35. Remove obsolete comment

    Mikael Ståldal authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    3443076 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    c798399 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    71136da View commit details
    Browse the repository at this point in the history
  38. Refactor properties ivar access.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    7267de2 View commit details
    Browse the repository at this point in the history
  39. [LOG4J2-1523] Log4j 1 appenders. Classic RollingFileAppender with

    property substitutions.
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    cd70374 View commit details
    Browse the repository at this point in the history
  40. [LOG4J2-1523] Log4j 1 appenders. Classic RollingFileAppender with

    property substitutions.
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    e939f8e View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    8f8077a View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    fc325d2 View commit details
    Browse the repository at this point in the history
  43. Clarify Javadocs.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    4a7d5b4 View commit details
    Browse the repository at this point in the history
  44. Better exception message.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    2ff8310 View commit details
    Browse the repository at this point in the history
  45. Beef up Log4j 1.2 to 2 convertion utility. The new test makes it easy to

    see what we cannot convert yet (at least what the converter blows up
    on).
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    6dc903e View commit details
    Browse the repository at this point in the history
  46. Better error reporting.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    d2812b9 View commit details
    Browse the repository at this point in the history
  47. Better error reporting.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    e902fb9 View commit details
    Browse the repository at this point in the history
  48. Minor refactoring of dup calls.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    f53c1c3 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    85ec8b8 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    ad622af View commit details
    Browse the repository at this point in the history
  51. Refactor some common code.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    3f6cb0c View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    6be905c View commit details
    Browse the repository at this point in the history
  53. Convert properties.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    8e83773 View commit details
    Browse the repository at this point in the history
  54. Remove unused import.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    c1c2cb7 View commit details
    Browse the repository at this point in the history
  55. Sort properties.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    b6f7de2 View commit details
    Browse the repository at this point in the history
  56. toString() is implied.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    93b56a0 View commit details
    Browse the repository at this point in the history
  57. Fix regression.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    0be54ee View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    cd99435 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    e3a9fe5 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    58974f6 View commit details
    Browse the repository at this point in the history
  61. LOG4J2-2011 replace JCommander command line parser with picocli to le…

    …t users run Log4j2 utility applications without requiring an external dependency
    remkop authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    8899cc7 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    0341e79 View commit details
    Browse the repository at this point in the history
  63. [LOG4J2-3014] Log4j1ConfigurationConverter on Windows produces "
"

    at end of every line.
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    8690b90 View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    b94517c View commit details
    Browse the repository at this point in the history
  65. Fix string substitution recursion

    carterkozak authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    af69703 View commit details
    Browse the repository at this point in the history
  66. Use generics.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    3af65c7 View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    a196fcc View commit details
    Browse the repository at this point in the history
  68. Adds support for missing Log4j 1.x properties and fixes default value…

    …s (#737)
    
    * Fixes default Log4j 1.x values
    
    The properties of the generated appenders are not always the same as it
    was in Log4j 1.x.
    
    * Fixes NoSuchFieldError
    
    Adapts `getAppendProperty` to different Java versions.
    
    * Fixes whitespace problems
    
    Conflicts:
    	log4j-1.2-api/src/main/java/org/apache/log4j/builders/appender/ConsoleAppenderBuilder.java
    	log4j-1.2-api/src/main/java/org/apache/log4j/builders/appender/DailyRollingFileAppenderBuilder.java
    	log4j-1.2-api/src/main/java/org/apache/log4j/builders/appender/FileAppenderBuilder.java
    	log4j-1.2-api/src/main/java/org/apache/log4j/builders/appender/RollingFileAppenderBuilder.java
    	log4j-1.2-api/src/main/java/org/apache/log4j/builders/layout/HtmlLayoutBuilder.java
    	log4j-1.2-api/src/test/java/org/apache/log4j/config/PropertiesConfigurationTest.java
    ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    5342191 View commit details
    Browse the repository at this point in the history
  69. Remove unused method.

    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    c255b12 View commit details
    Browse the repository at this point in the history
  70. Allow for whitespace in property files.

    Tests are from PR #762 by ppkarwasz.
    
    Conflicts:
    	log4j-1.2-api/src/main/java/org/apache/log4j/builders/BuilderManager.java
    	log4j-1.2-api/src/test/java/org/apache/log4j/config/Log4j1ConfigurationFactoryTest.java
    	log4j-1.2-api/src/test/java/org/apache/log4j/config/PropertiesConfigurationTest.java
    garydgregory authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    cf8bc91 View commit details
    Browse the repository at this point in the history
  71. Adds Log4j 1.x global threshold (#764)

    The `log4j.threshold` configuration key was not translated into its
    Log4j 2.x equivalent global filter.
    
    Conflicts:
    	log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java
    ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    8f138d6 View commit details
    Browse the repository at this point in the history
  72. final synchronization with 2.17.2

    Synchronizes `log4j-1.2-api` main source with version 2.17.2. It mainly
    consists of:
    
    * formatting,
    * `final` modifiers,
    * the removal of the deprecated `Holder` class.
    ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    45a0b60 View commit details
    Browse the repository at this point in the history
  73. [LOG4J2-3419] Add a Log4j 1.x level name pattern converter

    When custom levels are in play the names of Log4j 1.x custom levels
    (which are not unique) and those of Log4j 2.x custom levels (which must
    be unique) do not match.
    
    There is a need therefore for a pattern converter specific to Log4j 1.x.
    
    Conflicts:
    	log4j-1.2-api/src/main/java/org/apache/log4j/builders/layout/PatternLayoutBuilder.java
    	log4j-1.2-api/src/main/java/org/apache/log4j/builders/layout/SimpleLayoutBuilder.java
    ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    42ec510 View commit details
    Browse the repository at this point in the history
  74. [LOG4J2-3419] Allows %pid in Log4j 1.x patterns

    Although `%pid` was never a valid Log4j 1.x pattern, it was supported in
    the previous bridge versions.
    
    This fixes a regression with respect to `log4j-1.2-api` version 2.17.2.
    
    Conflicts:
    	log4j-1.2-api/src/main/java/org/apache/log4j/builders/layout/PatternLayoutBuilder.java
    ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    c28d39f View commit details
    Browse the repository at this point in the history
  75. Extract Category annotation from Plugin and add to Key

    - Moved Plugin::category into recently created annotation Category::value
    - Category is no longer a qualifier type but instead a namespace for Key.
    - Allow for stereotype annotations for Category to make categories annotation-type-safe when desired (including new TypeConverterCategory stereotype)
    - Rename Plugin::name to Plugin::value and make it optional, defaulting to the simple class name of the annotated class
    - Add PluginEntry::getElementName to more consistently store element names along with refactoring to use a builder pattern
    - Fix PluginElementVisitor to fall back to checking a plugin name when the element name isn't defined. This inconsistency arose from a typo somewhere.
    - Update PluginOrder to fall back to comparing by class name when neither class is annotated
    - Replace Named with Category when injecting plugin categories
    - Update docs to clarify that plugin categories are namespaces
    
    Signed-off-by: Matt Sicker <[email protected]>
    jvz authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    3803627 View commit details
    Browse the repository at this point in the history
  76. Change {@literal null} to {@code null} (#1424)

    mernst authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    98f9cee View commit details
    Browse the repository at this point in the history
  77. Apply Spotless to all files

    spotless[bot] authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    f37afc1 View commit details
    Browse the repository at this point in the history
  78. Configuration menu
    Copy the full SHA
    10f8cc2 View commit details
    Browse the repository at this point in the history
  79. Format using Palantir formatter

    Spotless authored and ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    fce7b8f View commit details
    Browse the repository at this point in the history
  80. Generalize DI usage

    This commit ensures that:
    
    * an `InstanceFactory` is created in the Log4j `Provider`,
    * the same factory is injected as parameters to all
      the components of the chain `Log4jContextFactory`, `ContextSelector`,
      `LoggerContext` (child), `Configuration` (grand-child).
    * `DI.createInstanceFactory` is called only when strictly necessary.
    ppkarwasz committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    eeff3d7 View commit details
    Browse the repository at this point in the history
  81. Configuration menu
    Copy the full SHA
    ec14b3f View commit details
    Browse the repository at this point in the history
  82. Configuration menu
    Copy the full SHA
    bcece68 View commit details
    Browse the repository at this point in the history
  83. Configuration menu
    Copy the full SHA
    9e527e1 View commit details
    Browse the repository at this point in the history
  84. Configuration menu
    Copy the full SHA
    fc9f584 View commit details
    Browse the repository at this point in the history