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

Fixed error logging UI logs due to logger undefined property #7267

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed adding the same filter twice doesn't show it in the search bar [#7185](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7185)
- Fixed rendering of rows in CDB list table when it starts with quotes [#7171](https://github.com/wazuh/wazuh-dashboard-plugins/issues/7171)
- Fixed width of long fields in the document detail flyout [#7206](https://github.com/wazuh/wazuh-dashboard-plugins/issues/7206)
- Fixed logging UI logs due to logger undefined property [#7267](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7267)

## Wazuh v4.11.0 - OpenSearch Dashboards 2.16.0 - Revision 00

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export class UiLogsCtrl {
try {
const { location, message, level } = request.body;
const loggerUI = context.wazuh.logger.get('ui');
const loggerByLevel = loggerUI?.[level] || loggerUI.error;
loggerByLevel(`${location}: ${message}`);
const loggerLevel = loggerUI?.[level] ? level : 'error';
loggerUI[loggerLevel](`${location}: ${message}`);
return response.ok({
body: {
statusCode: 200,
Expand Down
Loading