ksilisk commented on PR #1193:
URL: https://github.com/apache/shiro/pull/1193#issuecomment-1837434215

   > Interesting. looking at this, the old hasher CLI tool just gave the hash 
as the output. Now, we get an additional `[INFO ]` prefix. For parsing, leaving 
out the prefix would be beneficial.
   > 
   > Then, the `-5level` is probably to align output nicely:
   > 
   > ```
   > [DEBUG] message
   > [INFO ] hash: …
   > [WARN ] a warning
   > [ERROR] an error
   > ```
   > 
   > That said, I'd prefer to rather change the pattern in `log4j.xml` to just 
`%msg%n` for compatibility and leave the `LOG.info` statement as-is for easier 
parsing. Interesting. looking at this, the old hasher CLI tool just gave the 
hash as the output. Now, we get an additional `[INFO ]` prefix. For parsing, 
leaving out the prefix would be beneficial.
   > 
   > Then, the `-5level` is probably to align output nicely:
   > 
   > ```
   > [DEBUG] message
   > [INFO ] hash: …
   > [WARN ] a warning
   > [ERROR] an error
   > ```
   > 
   > That said, I'd prefer to rather change the pattern in `log4j.xml` to just 
`%msg%n` for compatibility and leave the `LOG.info` statement as-is for easier 
parsing.
   
   Thanks for the answer @bmarwell!
   
   No, before this the hash output looked like this
   ```
   [INFO ] some_hash
   ```
   
   In my opinion, the presence of a prefix is actually not correct, as was 
described in the SHIRO-820 issue.
   
   I think that the best solution would be to display the hash in `System.out` 
without any prefix.
   Then that will solve SHIRO-820.
   
   In this case, there is no need to change the `log4j2.xml`
   Just change `LOG.info` to `System.out.println`
   
   If you agree with my decision, I'm ready to correct it. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to