-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: Log4j configurations and wording #11395
base: master
Are you sure you want to change the base?
Conversation
@vy is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@bitsandfoxes could you take a look at this when you have a moment? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vy, looks great, but I would skip the schema location in the examples. Since Sentry
is not in the generated XML Schema, the examples would not validate.
Some context for the Sentry team
We recently added a log4j-docgen
tool that generates documentation and XML schemas from the Javadoc of elements annotated with @Plugin*
.
You can find more information on the Log4j Docgen website.
A priori the tool could generate an XML Schema, which includes the Sentry
element and all its options, but it is still pretty much rough around the edges and currently we only use it for our internal artifacts.
The long term plan, however, is:
- We ask Log4j Plugin vendors to publish a
*-log4jdoc.xml
artifact with each release. - We configure Dependabot to watch for updates to
sentry-log4j2
. - At each new release we regenerate our Plugin Reference to include
Sentry
, - At each new release we regenerate our XSD Schemas to include a
Sentry
element.
As I mentioned before, right now such a process would be far from being easy, but in time it could show the size of the Log4j community and make logging.apache.org
more of a common effort.
<Configuration xmlns="https://logging.apache.org/xml/ns" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-config-2.xsd"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Configuration xmlns="https://logging.apache.org/xml/ns" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-config-2.xsd"> | |
<Configuration xmlns="https://logging.apache.org/xml/ns"> |
<Configuration xmlns="https://logging.apache.org/xml/ns" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-config-2.xsd"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Configuration xmlns="https://logging.apache.org/xml/ns" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-config-2.xsd"> | |
<Configuration xmlns="https://logging.apache.org/xml/ns"> |
<Configuration xmlns="https://logging.apache.org/xml/ns" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-config-2.xsd"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Configuration xmlns="https://logging.apache.org/xml/ns" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-config-2.xsd"> | |
<Configuration xmlns="https://logging.apache.org/xml/ns"> |
@ppkarwasz, Thanks so much for the review.
I prefer to keep the schema location, since, contrary to the current situation (and your proposal) where there is no IDE assistance, my proposal will enable complete IDE assistance except for one line:
Log4j team can ping Sentry again when this plan is realized. |
I think this is a problem that |
The current Log4j 2 documentation contains configurations with deprecated and redundant
packages
attributes, which cause runtime warnings for users – see apache/logging-log4j2#2966. This PRpackages
attributestatus
attributeLog4j2
in text withLog4j 2
IS YOUR CHANGE URGENT?
Not urgent, can wait up to 1 week+
REVIEWERS
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: