[cleanup] erefactor/AutoRefactor - Log parameters rather than log mes…#9133
Conversation
There was a problem hiding this comment.
this formatting is strange. baseName is vertically where logged string ends
There was a problem hiding this comment.
As I wrote in the related ticket, the cleanup breaks some formatting.
There was a problem hiding this comment.
this still can be improved to {} {} in log message
There was a problem hiding this comment.
Interesting case, may be worth improving the cleanup.
There was a problem hiding this comment.
Good catch. We can improve it in another PR as I may have some other enhancements for the ObjC client generator.
There was a problem hiding this comment.
toString also should be removed from refactored code as LOGGER will call that internally if required
|
I cannot merge this as the refactoring uses tabs instead of 4-space (caught by Travis CI). Partial result below: Can we change the refactoring tool to use 4-space instead of tabs? |
…sage AutoRefactor cleanup 'LogParametersRatherThanLogMessage' applied by erefactor: Replaces a string concatenation as parameter of a logger method by a string template followed by objects. For AutoRefactor see https://github.com/JnRouvignac/AutoRefactor For erefactor see https://github.com/cal101/erefactor
d68d750 to
717b325
Compare
|
@wing328 Solving the wrong problem took much longer than expected. But solution may be useful for other cases. A bug in the cleanup was fixed and indentation is changed to 4 spaces. |
…sage
Example PR for #9097
AutoRefactor cleanup 'LogParametersRatherThanLogMessage' applied by erefactor:
Replaces a string concatenation as parameter of a logger method by a
string template followed by objects.
For AutoRefactor see https://github.com/JnRouvignac/AutoRefactor
For erefactor see https://github.com/cal101/erefactor
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master,5.1.x,6.0.x