Skip to content

Commit e144cb2

Browse files
cptwontoncptwonton
authored andcommitted
adds fixes suggested by August
1 parent df51ce7 commit e144cb2

File tree

2 files changed

+38
-26
lines changed

2 files changed

+38
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ checksums of files in the latest version, while the command in (4)
6767
behavior. For example, to update the checksums while checking the
6868
diff, run `mvn starts:diff -DupdateDiffChecksums=true`.
6969

70-
[Logging and Artifact storage Docs](./STARTS-LOGGING.md)
70+
[Logging and Artifact Storage Docs](./STARTS-LOGGING.md)
7171

7272
## Papers on STARTS
7373

STARTS-LOGGING.md

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ Logging in STARTS is a customized (read: simpler) version of [java.util.logging
88
The code for logging is located in starts-core/src/main/java/edu/illinois/starts/util/Logger.java
99

1010

11-
1211
For any piece of starts that you'd like to add logging to, begin by adding two import statements at the top:
13-
- ``import edu.illinois.starts.util.Logger;``
12+
13+
- ``import edu.illinois.starts.util.Logger;``
1414
- ``import java.util.logging.Level;``
15-
_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_
15+
16+
_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_
17+
1618

1719
Next, instantiate your Logger as a class variable:
1820
- ``protected static final Logger logger = Logger.getGlobal();``
@@ -27,12 +29,18 @@ There are 7 logging levels (excluding OFF and ALL), just like JUL:
2729
- FINER
2830
- FINEST (lowest value)
2931

30-
To set the logging level of your log, use the ``setLoggingLevel(Level level)`` method.
31-
i.e.
32+
To set the logging level of your log, use the
33+
34+
``setLoggingLevel(Level level)``
35+
36+
method.
37+
i.e.,
38+
3239
``logger.setLoggingLevel(Level.CONFIG);``
3340

3441
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).
35-
i.e.
42+
i.e.,
43+
3644
``Level currentLevel = logger.getLoggingLevel();``
3745

3846
## Writing messages
@@ -45,7 +53,9 @@ should be used when you want to have a custom message AND an exception message
4553
###### ``public void log(Level lev, String msg)``
4654
should be used when you only want to have a custom message
4755

48-
i.e. ``logger.log(Level.SEVERE, "houston we have a problem");``
56+
i.e.,
57+
58+
``logger.log(Level.SEVERE, "houston we have a problem");``
4959

5060
In both cases above, the provided message will only be logged if the specified logging Level is equal to or higher in severity than the Level the logger is set to.
5161
For example, if ``logger.setLoggingLevel(Level.SEVERE);``, then only ``logger.log()`` messages with Level.SEVERE will be spit out.
@@ -54,29 +64,31 @@ Similarly, if ``logger.setLoggingLevel(Level.CONFIG);``, then ``logger.log()`` w
5464
## Where will messages be output?
5565
Standard Output (System.out)
5666

57-
## Artifact Storage
67+
## Artifact storage
5868
The logging granularities serve a dual purpose - both to control which log messages in code are sent to standard output, AND to control which artifacts are stored between runs.
5969

60-
The default Level.INFO will store:
61-
- checksum
62-
- dependency file (.starts/deps.zlc)
70+
The default __Level.INFO__ will store:
71+
- _dependency file/checksum (.starts/deps.zlc)_
6372

64-
Level.FINER will store:
65-
- dependency file (.starts/deps.zlc)
66-
- list of all tests
67-
- list of impacted tests
73+
__Level.FINER__ will store:
74+
- _dependency file/checksum (.starts/deps.zlc)_
75+
- _list of all tests_
76+
- _list of impacted tests_
6877

69-
Level.FINEST will store:
70-
- list of all tests
71-
- list of impacted tests
72-
- list of non-impacted tests
73-
- list of dependencies computed by jdeps
74-
- classpath that STARTS used
75-
- yasgl graph that STARTS constructed
76-
- set of changed types
78+
__Level.FINEST__ will store:
79+
- _dependency file/checksum (.starts/deps.zlc)_
80+
- _list of all tests_
81+
- _list of impacted tests_
82+
- _list of non-impacted tests_
83+
- _list of dependencies computed by jdeps_
84+
- _classpath that STARTS used_
85+
- _yasgl graph that STARTS constructed_
86+
- _set of changed types_
7787

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

80-
``mvn starts:starts -DStartsLogging=<Level>``
90+
``mvn starts:starts -DstartsLogging=<Level>``
91+
92+
i.e.,
8193

82-
i.e. ``mvn starts:starts -DStartsLogging=FINEST``
94+
``mvn starts:starts -DstartsLogging=FINEST``

0 commit comments

Comments
 (0)