https://github.com/yanzhan91/easy-print
Easier way to debug with print.
https://github.com/yanzhan91/easy-print
debugging debugging-tool java library maven print println systemout
Last synced: 3 months ago
JSON representation
Easier way to debug with print.
- Host: GitHub
- URL: https://github.com/yanzhan91/easy-print
- Owner: yanzhan91
- License: mit
- Created: 2021-07-01T04:30:39.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-08T05:18:12.000Z (almost 5 years ago)
- Last Synced: 2025-07-23T18:34:49.232Z (9 months ago)
- Topics: debugging, debugging-tool, java, library, maven, print, println, systemout
- Language: Java
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# easy-print
[](https://github.com/yanzhan91/easy-print/actions/workflows/maven.yml)
[](https://github.com/yanzhan91/easy-print/blob/main/LICENSE)
Never use `system.out.println()` again!
### Features
1. `print(...)` or `p(...)` to replace `system.out.println()`
2. Toggle on/off prints in higher environments with `EasyPrint.enable(false)` or using environment variable `EASYPRINT_ENABLED = false`
3. Spy on method parameters allowing you to know exactly what you're passing in. See below for examples.
4. Display package, class, method, line number, and even the type of printed argument. Reduce output verbiage by optionally toggling on/off configurations.
### Usage
```
io.github.yanzhan91
easy-print
{version}
```
```
import static EasyPrint.print;
import static EasyPrint.p;
print("I'm printing a string")
p("This is a shorter method name")
int a = 3;
int b = 4;
int c = 5;
boolean result = isPythagoreanTriple(p(a), p(b), p(c));
print(result)
```
```
>>> com.package.class_name > method_name:line_number (java.lang.String) - I'm printing a string
>>> com.package.class_name > method_name:line_number (java.lang.String) - This is a shorter method name
>>> com.package.class_name > method_name:line_number (java.lang.Integer) - 3
>>> com.package.class_name > method_name:line_number (java.lang.Integer) - 4
>>> com.package.class_name > method_name:line_number (java.lang.Integer) - 5
>>> com.package.class_name > method_name:line_number (java.lang.Boolean) - true
```
### Customization
```
EasyPrint.enable(true)
EasyPrint.setShowLineNumber(true)
EasyPrint.setShowType(true)
```
Or with environment variables (this takes precedence)
```
EASYPRINT_ENABLED = false
EASYPRINT_SHOWLINENUMBER = false
EASYPRINT_SHOWTYPE = false
```