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

Starts logging #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cptwonton
Copy link
Contributor

adds documentation for logging functionality in STARTS

includes info about artifact storage from paper

adds link in README.md to starts logging docs

README.md Outdated
@@ -66,6 +66,8 @@ checksums of files in the latest version, while the command in (4)
behavior. For example, to update the checksums while checking the
diff, run `mvn starts:diff -DupdateDiffChecksums=true`.

[Logging and Artifact storage Docs](./STARTS-LOGGING.md)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Capitalize storage

For any piece of starts that you'd like to add logging to, begin by adding two import statements at the top:
- ``import edu.illinois.starts.util.Logger;``
- ``import java.util.logging.Level;``
_note: you may need to make minor changes to the positioning of these two import statements to ensure checkstyle does not break. place ``edu.illinois.starts.util.Logger`` directly underneath the other imports with the same package name, and do the same with ``java.util.logging.Level``. additionally, ensure you have a newline separating different package names_
Copy link
Collaborator

@august782 august782 Nov 17, 2017

Choose a reason for hiding this comment

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

Capitalize place, capitalize additionally. Add period at the end (after "different package names").

Is there a way to get this note to appear underneath the previous point (import java.util.logging.Level;), indented along with it, but without the bullet point? If possible, I think it would look nicer.

- FINEST (lowest value)

To set the logging level of your log, use the ``setLoggingLevel(Level level)`` method.
i.e.
Copy link
Collaborator

@august782 august782 Nov 17, 2017

Choose a reason for hiding this comment

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

i.e. -> i.e.,

Can the code go on a separate line?

``logger.setLoggingLevel(Level.CONFIG);``

To check the logging level, use the ``getLoggingLevel()`` method, which will return an object of type [Level](https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html).
i.e.
Copy link
Collaborator

@august782 august782 Nov 17, 2017

Choose a reason for hiding this comment

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

i.e. -> i.e.,

Can the code go on a separate line (not inlined)?

###### ``public void log(Level lev, String msg)``
should be used when you only want to have a custom message

i.e. ``logger.log(Level.SEVERE, "houston we have a problem");``
Copy link
Collaborator

Choose a reason for hiding this comment

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

i.e. -> i.e.,

## Where will messages be output?
Standard Output (System.out)

## Artifact Storage
Copy link
Collaborator

Choose a reason for hiding this comment

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

Uncapitalize Storage (for consistency of the other sections).


``mvn starts:starts -DStartsLogging=<Level>``

i.e. ``mvn starts:starts -DStartsLogging=FINEST``
Copy link
Collaborator

Choose a reason for hiding this comment

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

i.e. -> i.e.,

- dependency file (.starts/deps.zlc)

Level.FINER will store:
- dependency file (.starts/deps.zlc)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't FINER include all the things in INFO, including checksum (actually, isn't checksum a part of dependency file)?

- list of impacted tests

Level.FINEST will store:
- list of all tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similarly, shouldn't FINEST also contain of of FINER (currently missing dependency file/checksum)?


To set the log level at runtime, call starts like this:

``mvn starts:starts -DStartsLogging=<Level>``
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe the option actually has it lower case, i.e., startsLogging. Please double check.

@cptwonton
Copy link
Contributor Author

cptwonton commented Nov 17, 2017

@august782 thanks for the feedback. I've rebased to include the two merges that Owolabi recently made to testingresearchillinois/starts, and added the fixes you've suggested

@owolabileg
Copy link
Collaborator

@cptwonton, please rebase master, into this branch, and we can see if it is ready to merge.

@cptwonton
Copy link
Contributor Author

@owolabileg this is done

adds logging documentation to STARTS, incorporating the paper's details on artifact storage
@cptwonton cptwonton force-pushed the STARTS-LOGGING branch 2 times, most recently from 0805871 to e144cb2 Compare December 15, 2017 05:08
@cptwonton
Copy link
Contributor Author

@owolabileg rebased and squashed and ready for merging into master

@benjamin-shen
Copy link
Contributor

Closes #4

Copy link
Contributor

@benjamin-shen benjamin-shen left a comment

Choose a reason for hiding this comment

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

Has there been any discussion on whether or not this documentation should live in another place, like a docs/ folder (or even the Github wiki)?

@owolabileg other than my comments, this pr LGTM.

STARTS-LOGGING.md Outdated Show resolved Hide resolved
STARTS-LOGGING.md Outdated Show resolved Hide resolved
owolabileg and others added 2 commits August 22, 2023 14:46
Co-authored-by: Benjamin Shen <[email protected]>
Co-authored-by: Benjamin Shen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants