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

Entire codesniffer JS source file is written to logs for each accessibility collect #446

Closed
tkaik opened this issue Nov 29, 2018 · 1 comment · Fixed by #468
Closed

Entire codesniffer JS source file is written to logs for each accessibility collect #446

tkaik opened this issue Nov 29, 2018 · 1 comment · Fixed by #468
Assignees
Labels
enhancement good first issue This is great opportunity to start your adventure with AET. help wanted Hey, contributor! We need your help.

Comments

@tkaik
Copy link
Contributor

tkaik commented Nov 29, 2018

Describe the bug
When using the accessibility collector in a suite, the entire codesniffer JS source file is written to logs for each accessibility collection. This happens only in the DEBUG logs level - however this should not happen even on this level - this JS file contains few thousands lines of code.

CC @plutasnyy

  • Version used: AET 3.1.0

To Reproduce
Steps to reproduce the behavior:
0. Make sure that the Logger on your AET environement (karaf) is set to DEBUG mode

  1. Prepare a suite XML with a test using accessibility collector.
  2. Run the suite
  3. View the worker.log file - see the entry starting with
    <time> | DEBUG | com.cognifide.aet.jobs | JavaScriptJobExecutor 51 | Executing JavaScript command: /* followed by the whole source of htmlcs.js file

Expected behavior
Option 1 - When writing the JS code snippet to the log file, it's length should be limited to some reasonable value (e.g. first 100 characters).
Option 2 -The Accessibility collector should not log the content of executed JS file at all

@malaskowski
Copy link
Contributor

We had already short chat about that with @plutasnyy
My suggestion is to:

  1. Change log level in JavaScriptJobExecutor.executeJs to TRACE (trace is a good level to log such details).
  2. Add separate DEBUG level logs in every collector/modifier that calls JavaScriptJobExecutor.executeJs that will say something like:

Executing MODIFIER_NAME ...

@malaskowski malaskowski added enhancement help wanted Hey, contributor! We need your help. good first issue This is great opportunity to start your adventure with AET. labels Nov 29, 2018
@Asia95 Asia95 self-assigned this Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue This is great opportunity to start your adventure with AET. help wanted Hey, contributor! We need your help.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants