Skip to content

[QC-871] Add log rotate parameters and refactor how we pass the discard file options #1488

Merged
Barthelemy merged 5 commits into
AliceO2Group:masterfrom
Barthelemy:additional-discard-options
Oct 10, 2022
Merged

[QC-871] Add log rotate parameters and refactor how we pass the discard file options #1488
Barthelemy merged 5 commits into
AliceO2Group:masterfrom
Barthelemy:additional-discard-options

Conversation

@Barthelemy
Copy link
Copy Markdown
Collaborator

@Barthelemy Barthelemy commented Oct 4, 2022

No description provided.

@Barthelemy Barthelemy requested a review from knopers8 as a code owner October 4, 2022 13:08
@Barthelemy Barthelemy changed the title [WIP] [QC-871] Refactor how we pass the discard file options to avoid an ex… [WIP] [QC-871] Add log rotate parameters and refactor how we pass the discard file options Oct 10, 2022
@Barthelemy Barthelemy changed the title [WIP] [QC-871] Add log rotate parameters and refactor how we pass the discard file options [QC-871] Add log rotate parameters and refactor how we pass the discard file options Oct 10, 2022
Comment on lines +30 to +37
struct DiscardFileParameters {
bool debug = false;
int fromLevel = 21 /* Discard Trace */;
std::string discardFile;
unsigned long rotateMaxBytes = 0;
unsigned int rotateMaxFiles = 0;
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as a future improvement, I would propose to move this structure to a separate file, so we do not include QcInfologger header in configuration structures.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, will do

Comment on lines +101 to +104
discardFileParameters.debug = discardDebugStr == "true";
discardFileParameters.fromLevel = config.get<int>("qc.config.infologger.filterDiscardLevel", 21 /* Discard Trace */);
discardFileParameters.discardFile = config.get<std::string>("qc.config.infologger.filterDiscardFile", "");
init(facility, discardFileParameters, dplInfoLogger, dplContext, run, partitionName);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you not reloading all the parameters?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, will fix.

Comment thread doc/Advanced.md
"The keyword _ID_, if used, is replaced by the device ID.",
"Discarded Debug messages don't go there."],
"filterRotateMaxBytes": "", "": "Maximum size of the discard file.",
"filterRotateMaxFiles": "", "": "Maximum number of discard files."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why there could be more than one?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't that how logrotate usually works ? when a file is full it creates a new one, within the limit of the number of files ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes, of course

@Barthelemy
Copy link
Copy Markdown
Collaborator Author

as o2-cs8 and o2-dataflow-cs8 have passed, I merged to be able to release

@Barthelemy Barthelemy merged commit c033266 into AliceO2Group:master Oct 10, 2022
@Barthelemy Barthelemy deleted the additional-discard-options branch October 10, 2022 09:20
Barthelemy added a commit that referenced this pull request Oct 10, 2022
…rd file options (#1488)

* [QC-871] Refactor how we pass the discard file options to avoid an explosion and add the missing ones

* format

* Update CMakeLists.txt

* Update SkeletonTask.cxx
ercolessi pushed a commit to ercolessi/QualityControl that referenced this pull request Oct 13, 2022
…rd file options (AliceO2Group#1488)

* [QC-871] Refactor how we pass the discard file options to avoid an explosion and add the missing ones

* format

* Update CMakeLists.txt

* Update SkeletonTask.cxx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants