NIFI-6628: Separate out logging of extensions vs. nifi framework #3698
NIFI-6628: Separate out logging of extensions vs. nifi framework #3698adarmiento wants to merge 8 commits intoapache:masterfrom
Conversation
|
I am not sure about the semantic: I am investigating the other logging stuff (groovy and upgrade files in nifi-toolkit) which I think should be updated as well |
|
@adarmiento Thanks for the PR! I went back & forth in my mind over what made sense here as far as configuring different elements. This PR goes the route of making the framework file the default, and then selectively choosing what goes into the app-log. But I think we have to go the other way. The app-log should be default, and then be selective about which packages we put into the framework log. This is because we processors/controller services/etc. do not just belong to the package "org.apache.nifi.processors". We have some that are just in "org.apache.nifi", some in "org.apache.nifi.json", etc., etc. And users can have their own custom processors, in a package of say "com.mycompany" and we don't want that going to the framework log. So we will need the default to remain the app-log and then select specific packages to put into the framework.log file. Does that make sense? |
|
Hello @markap14 |
New Framework file for all framework-related loggers
|
@markap14 as a quick job, I just reverted As you mentioned, there are Processors and Controller Services widespread among various packages which may not be encompassed by those existing loggers. Only editing those loggers would make those processors log lines end up in the Do you think it will be the correct choice to fathom the codebase in search of those Processor/Services and creating additional dedicated loggers in |
|
Thanks @adarmiento . I think this is getting closer. It looks like the latest commit puts |
|
Hello @markap14, and sorry for my late reply. I started looking at the nifi-nar-bundles/nifi-framework-bundle/nifi-framework, right now, I added some loggers for the packages in the nifi-framework-core module. |
|
I've added further framework cases for other modules in the |
|
Thanks for the update! Unfortunately, I think this is going to be pretty verbose... it probably makes a lot of sense to insert a new package into the framework code and put things under I think there are a few loggers included here that should go to app-log instead of framework-log (calcite for example). And some loggers should be in |
|
Hello @markap14, I've evaluated the middle package strategy too, but I immediately discarded because as you mentioned would be a massive refactoring. Thanks for the tips, it's not an easy job discern for every package whether or not it's a framework or app feature. |
* org.apache.nifi.calcite now logs with the NIFI-APP logger * org.apache.nifi.authorization now logs with the NIFI-USER logger
|
OK things look much better there. I found a few duplicates and a couple of packages that we should add. Also updated the time to keep the framework log to 7 days by default, gzipped. And updated all of the loggers to set |
|
OK, I uploaded a .patch file to the Jira (https://issues.apache.org/jira/secure/attachment/12981600/0001-NIFI-6628-Updates-to-logback-to-ensure-that-app-log-.patch). Please do check it out and if you're happy push the changes to your PR and ping me so that I can merge it. |
|
Hello @markap14, thanks for the patch! I also added a little cleanup and reorder for better readability. |
- Fix some duplicates/errors - Save up to 1 week of logs for the FRAMEWORK logger - Keep the FRAMEWORK log in GZIP format * General reorder and cleanup
|
Hello @markap14 |
|
closing due to inactivity |
Description of PR
Updated main and test
logback.xmlIn order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically
master)?Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not
squashor use--forcewhen pushing to allow for clean monitoring of changes.For code changes:
mvn -Pcontrib-check clean installat the rootnififolder?LICENSEfile, including the mainLICENSEfile undernifi-assembly?NOTICEfile, including the mainNOTICEfile found undernifi-assembly?.displayNamein addition to .name (programmatic access) for each of the new properties?For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.