Skip to content

Logging improvements #40

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

Merged
merged 5 commits into from
Sep 1, 2020

Conversation

Alkar778
Copy link
Contributor

@Alkar778 Alkar778 commented Aug 24, 2020

Description

This PR reduces the size of cache.log file

Manual testing scenarios

  1. Create a product
  2. Go to var/log/cache.log file
    Expected Result
  3. File Exists
  4. File Contain invalidated tags and compressed debug trace

Release notes

Reduced the size of the cache.log file to improve performance.

Associated documentation updates

Add link to Magento DevDocs PR or Issue, if needed.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • Pull request introduces user-facing changes and includes meaningful updates for any required release notes and documentation changes
  • All commits are accompanied by meaningful commit messages

@BarnyShergold
Copy link

@magento run all tests

@BarnyShergold BarnyShergold self-assigned this Aug 24, 2020
@m2-community-project m2-community-project bot added the Progress: review PR/issue status label Aug 24, 2020
Copy link

@BarnyShergold BarnyShergold left a comment

Choose a reason for hiding this comment

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

Add proper description, notes etc
Ensure Travis tests pass.

@Alkar778
Copy link
Contributor Author

@BarnyShergold
The description has been updated.
Travis is failing not through my fault

Copy link

@kandy kandy left a comment

Choose a reason for hiding this comment

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

Please check the comment

kandy
kandy previously approved these changes Aug 24, 2020
BarnyShergold
BarnyShergold previously approved these changes Aug 25, 2020
Copy link

@BarnyShergold BarnyShergold left a comment

Choose a reason for hiding this comment

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

Accepted that Travis is failing for unknown reasons

@oshmyheliuk
Copy link
Contributor

@Alkar778 I've created separate PR from this pr for test running and static tests failed

FILE: /home/travis/build/magento/magento-cloud-components/Model/DebugTrace.php
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
 6 | ERROR | [x] Missing strict_types declaration
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------
FILE: ...is/build/magento/magento-cloud-components/Model/Cache/InvalidateLogger.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 78 | ERROR | Code must not contain multiple empty lines in a row; found 2
    |       | empty lines
--------------------------------------------------------------------------------

Please fix.

@Alkar778 Alkar778 dismissed stale reviews from BarnyShergold and kandy via 66d66fc August 25, 2020 16:55
@Alkar778
Copy link
Contributor Author

@oshmyheliuk
code style fixed

@Alkar778
Copy link
Contributor Author

@oshmyheliuk
I've pushed additional commit. Please review

@oshmyheliuk
Copy link
Contributor

@Alkar778 Static tests are ok, but functional failed

 [Exception]                                                                                                    
  Notice: Undefined index: file in /app/vendor/magento/magento-cloud-components/Model/DebugTrace.php on line 65 

public function getTrace()
{
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
foreach ($trace as $index => $line) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to add validation if elements of array $line is set.

$line['function']
$line['class']
$line['file']

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How can I reproduce case when the file key undefined?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@andriyShevtsov
Copy link
Contributor

QA approved

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.

8 participants