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
Introduced SLF4J for logging (w/ Logback in tests) #174
Conversation
Hi @rhyolight, can you add me to the "signed CL" list when you get a chance? Cheers |
@cogmission sorry about all the extra modified lines: even with auto-formatting disabled, IntelliJ strips tabs from blank lines. If you really want them, please do send over the Eclipse formatting standards you want to enforce. |
@cogmission & @solovyevk, I used: However, the use of |
@connollyst Wow! You really went to work! Thanks! I do have a question. In the following scenario, is it accepted practice to make the following method calls without testing for the current logging-level setting? I'm concerned about slowing down the code for times when we want to favor performance over output? In other words, shouldn't places like this be surrounded by some kind of if(Logger.level == TRACE) or some other similar semantic? (Please see the highlighted line here for an example: https://github.com/numenta/htm.java/pull/174/files#diff-f64f4121d6cbfa809d8a3ae0ad816df3R245) |
@connollyst EDIT: I sent @rhyolight a message, he should see this and add you. I didn't see your message above that you had already signed the license agreement (above). Merges brought in before your code also caused a failure in that code (fortunately only in two places visible from the "Details" link next to the Travis CI failure - in that person's submitted code "AdaptiveScalarEncoder".) Should be an easy fix. |
@connollyst Maybe something went wrong, but I have not received your signed contributor license agreement. Have you filled out the online form at http://numenta.org/licenses/cl/ ? |
Yup, I've signed the agreement. I just forwarded you the confirmation email I had received. |
@connollyst Thanks, got it, and done! |
AdaptiveScalarEncoder and DeltaEncoder with respective tests
@connollyst How do you like the labels? :-P (Of course I'm just joking with you) |
Hey @cogmission, Should be all set now. Cheers, |
@connollyst Did you see my question about surrounding Log calls with a test to make sure the log level warrants executing them? Otherwise we'll hit every single log statement that was added (a test in much the same way that if(verbosity == 2) <-- used to do? |
@connollyst Thanks for your hard work! I've since read that call sites involving String concatenations should have guards placed around them. So I will go through and fix these if any exist. |
Introduced SLF4J for logging (w/ Logback in tests)
Hey David, I did, sorry I didn't respond sooner (I'm up in Switzerland skiing - off the grid for the most part). So there are three ways to aspects to consider: readability, utility, and efficiency; not mutually exclusive of course. In terms of readability, I think using a logger is as good as, if not better than using With respect to utility, dito. It's on par with verbosity and is industry standard. Now, for efficiency. It's definitely not a silly question, especially considering writing to console/file is one of the most "tedious" things a program can do (grabbing locks, interacting with disk, etc.) I think there are two things to consider within this issue: computing the statement, & logging the statement. The latter first, The real concern is in computing the statement itself. For comparison, I saw some places where More info here: My 2¢: |
Fixes #150, #151, #152, #154, #155 and lays foundation for related issues.
Note: there is no use of verbosity in the
GeospatialCoordinateEncoder
and so #153 can be closed.