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

Fix creation of log files #3384

Merged
merged 8 commits into from
Jun 23, 2021
Merged

Fix creation of log files #3384

merged 8 commits into from
Jun 23, 2021

Conversation

pablomarga
Copy link
Contributor

Hi team this PR solves a problem related with the creation of the log files, adding a condition that if the file does not exist it will be created. Also solves a problem with the rotation of the log file if it's size is over 100MB.

@pablomarga pablomarga self-assigned this Jun 22, 2021
@pablomarga pablomarga requested a review from a team June 22, 2021 11:58
Copy link
Contributor

@gabiwassan gabiwassan left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼
CD ✅
Testting ✅

Comment on lines +41 to +42
this.PLAIN_LOGS_PATH = path.join(WAZUH_DATA_LOGS_DIRECTORY_PATH, plainLogsFile);
this.RAW_LOGS_PATH = path.join(WAZUH_DATA_LOGS_DIRECTORY_PATH, rawLogsFile);
Copy link
Member

@Desvelao Desvelao Jun 23, 2021

Choose a reason for hiding this comment

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

thought:: Could we move the variable that stores the path of these files to the constants.ts file?

server/lib/filesystem.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@eze9252 eze9252 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Desvelao
Copy link
Member

issue: The filename looks a little bit weird.
image

suggestion: Here it is the filename had before the changes: https://github.com/wazuh/wazuh-kibana-app/blob/12ad00eedf03e6625493b05d8ba9a9e6fff48a4e/server/lib/logger.ts#L105-L108

<FILENAME>.<DATE_IN_TIMESTAMP>.<EXTENSION>

Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

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

review
Code review: ✅
Testing: ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants