diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 0000000..2857933
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,31 @@
+# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
+# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
+
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+name: Test with Maven
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK 8
+ uses: actions/setup-java@v3
+ with:
+ java-version: '8'
+ distribution: 'temurin'
+ cache: maven
+ - name: Test with Maven
+ run: mvn -B clean test --file pom.xml
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index a5290e5..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: java
-
-script: mvn clean test
-
-after_success: mvn cobertura:cobertura coveralls:report -DrepoToken=$REPO_TOKEN
\ No newline at end of file
diff --git a/README.md b/README.md
index ff36d16..559c1cc 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,27 @@
-[![Build Status](https://travis-ci.org/sikorka/tiny-log.svg?branch=master)](https://travis-ci.org/sikorka/tiny-log)
+[![Build Status](https://github.com/sikorka/tiny-log/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/sikorka/tiny-log/actions/workflows/maven.yml)
[![Coverage Status](https://coveralls.io/repos/github/sikorka/tiny-log/badge.svg)](https://coveralls.io/github/sikorka/tiny-log)
Never miss a log message.
- |_ . _ | _ _
- |_ | | ) \/ | (_) (_)
- / _/
+ ____ _ _
+ | _ \ (_) __| | _ _ ___ _ _
+ | | | | | | / _` | | | | | / _ \ | | | |
+ | |_| | | | | (_| | | |_| | | (_) | | |_| |
+ |____/ |_| \__,_| \__, | \___/ \__,_|
+ |___/
+ _ _
+ ___ | |_ __ _ _ __ | |_
+ / __| | __| / _` | | '__| | __|
+ \__ \ | |_ | (_| | | | | |_
+ |___/ \__| \__,_| |_| \__|
+
+ _ _ ___
+ / \ _ __ _ __ (_) _ _ _ __ ___ |__ \
+ / _ \ | '_ \ | '_ \ | | | | | | | '_ ` _ \ / /
+ / ___ \ | |_) | | |_) | | | | |_| | | | | | | | |_|
+ /_/ \_\ | .__/ | .__/ |_| \__,_| |_| |_| |_| (_)
+ |_| |_|
+
Tiny Log solves the problem of unnoticed and unreadable messages in command line window: it highlights
messages using colors, **styles**, SIZES, *ASCII art fonts* and added space
@@ -30,7 +46,7 @@ Add a dependency into your `pom.xml`:
com.github.sikorka
tiny-log
- 2.1
+ 2.2
In the class that's about to log msgs add on top (import statically):
@@ -38,13 +54,11 @@ In the class that's about to log msgs add on top (import statically):
import static com.github.sikorka.TinyLog.*;
You can now add in your class:
-
- String something = "Hello there!";
- say(something);
- sayLoud(something);
- highlight(something);
- shout(something);
+ say("Hello!");
+ sayLoud("Loud hello!");
+ highlight("Highlighted hello.");
+ shout("Shouting!");
To add several lines in between log msgs use:
@@ -121,24 +135,22 @@ How it works
2. By using ASCII art for highlighting VERY IMPORTANT messages, like so:
- ____ _ _
- | _ \ (_) __| | _ _ ___ _ _
- | | | | | | / _` | | | | | / _ \ | | | |
- | |_| | | | | (_| | | |_| | | (_) | | |_| |
- |____/ |_| \__,_| \__, | \___/ \__,_|
- |___/
- _ _
- ___ | |_ __ _ _ __ | |_
- / __| | __| / _` | | '__| | __|
- \__ \ | |_ | (_| | | | | |_
- |___/ \__| \__,_| |_| \__|
-
- _ _ ___
- / \ _ __ _ __ (_) _ _ _ __ ___ |__ \
- / _ \ | '_ \ | '_ \ | | | | | | | '_ ` _ \ / /
- / ___ \ | |_) | | |_) | | | | |_| | | | | | | | |_|
- /_/ \_\ | .__/ | .__/ |_| \__,_| |_| |_| |_| (_)
- |_| |_|
+```
+ _____ _ _ _ _
+ / ____| | | (_) | | | |
+ | (___ ___ _ __ __ __ ___ _ __ | | _ | | __ ___ | | _ _
+ \___ \ / _ \ | '__| \ \ / / / _ \ | '__| | | | | | |/ / / _ \ | | | | | |
+ ____) | | __/ | | \ V / | __/ | | | | | | | < | __/ | | | |_| |
+ |_____/ \___| |_| \_/ \___| |_| |_| |_| |_|\_\ \___| |_| \__, |
+ __/ |
+ |___/
+ _ _ _ _
+ | | | | | | | |
+ ___ __ __ ___ _ __ | | ___ __ _ __| | ___ __| | | |
+ / _ \ \ \ / / / _ \ | '__| | | / _ \ / _` | / _` | / _ \ / _` | | |
+ | (_) | \ V / | __/ | | | | | (_) | | (_| | | (_| | | __/ | (_| | |_|
+ \___/ \_/ \___| |_| |_| \___/ \__,_| \__,_| \___| \__,_| (_)
+```
TODO
@@ -150,3 +162,11 @@ TODO
- add javadoc for basic usage
- create predefined, lazy outfits
- perhaps rename to color-log (?)
+
+
+With love,
+```
+ |_ . _ | _ _
+ |_ | | ) \/ | (_) (_)
+ / _/
+```
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 74215da..9a26dc8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.github.sikorka
tiny-log
- 2.1
+ 2.2
Tiny Log
Makes command line messages pop.
@@ -92,7 +92,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 2.20.1
+ 2.22.2
**/*Test.class
@@ -104,10 +104,10 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.7.0
+ 3.11.0
-
- 1.7
+
+ 1.8
diff --git a/src/main/java/com/github/sikorka/Outfit.java b/src/main/java/com/github/sikorka/Outfit.java
index 12e9872..4b4e172 100644
--- a/src/main/java/com/github/sikorka/Outfit.java
+++ b/src/main/java/com/github/sikorka/Outfit.java
@@ -11,8 +11,6 @@
* Dresses up {@link TinyLog} in pretty colors / sizes and fonts.
*/
public class Outfit {
- //TODO add specific texts before msg, like [DEBUG]
- //highlight just that text
//TODO create predefined, lazy loggers
//GIRLY - with pink (and blue?) colors
@@ -232,7 +230,7 @@ public Font getShoutFont() {
}
- public static void main(String args[]) {
+ public static void main(String[] args) {
Outfit b = new Outfit()
.shoutColor(Color.BOLD_PURPLE)
.shoutFont(Font.THIN_STRAIGHT)
@@ -240,7 +238,7 @@ public static void main(String args[]) {
dressUp(b);
say("------ colors");
say("say");
- shout("shout");
+ shout("shout!");
Outfit a = new Outfit()
@@ -248,7 +246,7 @@ public static void main(String args[]) {
.highlightFont(null);
dressUp(a);
say("------ fonts");
- shout("shout");
+ shout("shouting");
highlight("highlight");
say("say");
sayLoud("say loud");
@@ -261,7 +259,7 @@ public static void main(String args[]) {
TinyLog.dressUp(c);
say("------ upper lower case");
say("say");
- shout("shout");
+ shout("shouted");
highlight("highlight");
sayLoud("say loud");
}
diff --git a/src/main/java/com/github/sikorka/tinylog/Font.java b/src/main/java/com/github/sikorka/tinylog/Font.java
index 2864ab3..c94fa04 100644
--- a/src/main/java/com/github/sikorka/tinylog/Font.java
+++ b/src/main/java/com/github/sikorka/tinylog/Font.java
@@ -21,9 +21,9 @@ public enum Font {
BIG_BLOCK("block", 10);
- final static String URL = "http://www.figlet.org/fonts/";
- final static String CLASSPATH = "classpath:/";
- final static String EXTENSION = "flf";
+ static final String URL = "http://www.figlet.org/fonts/";
+ static final String CLASSPATH = "classpath:/";
+ static final String EXTENSION = "flf";
/** FLF font file name. */
private final String fontName;
diff --git a/src/test/java/com/github/sikorka/CustomLogTest.java b/src/test/java/com/github/sikorka/CustomLogTest.java
index b81586a..b7c4dc7 100644
--- a/src/test/java/com/github/sikorka/CustomLogTest.java
+++ b/src/test/java/com/github/sikorka/CustomLogTest.java
@@ -38,28 +38,28 @@ public static void bringBackPreviousOutfit() {
}
@Test
- public void sayPlainTest() {
+ void sayPlainTest() {
writePlain("Writing plain.");
}
@Test
- public void sayTest() {
+ void sayTest() {
say("Just sayin.");
}
@Test
- public void sayLoudTest() {
+ void sayLoudTest() {
sayLoud("Saying loud.");
}
@Test
- public void shoutTest() {
+ void shoutTest() {
shout("Shouting!");
}
@Test
- public void highlightTest() {
+ void highlightTest() {
highlight("Highlighting.");
}
diff --git a/src/test/java/com/github/sikorka/MyLogTest.java b/src/test/java/com/github/sikorka/MyLogTest.java
index 875f236..b692480 100644
--- a/src/test/java/com/github/sikorka/MyLogTest.java
+++ b/src/test/java/com/github/sikorka/MyLogTest.java
@@ -30,22 +30,22 @@ public static void bringBackPreviousOutfit() {
}
@Test
- public void sayTest() {
+ void sayTest() {
say("Just sayin in non-bold yellow.");
}
@Test
- public void sayLoudTest() {
+ void sayLoudTest() {
sayLoud("Saying loud in uppercase with bold purple.");
}
@Test
- public void shoutTest() {
+ void shoutTest() {
shout("Shouting blue bg with bold bright yellow text.");
}
@Test
- public void highlightTest() {
+ void highlightTest() {
highlight("HIGHLIGHTING in non-bold blue.");
}
diff --git a/src/test/java/com/github/sikorka/TinyLogTest.java b/src/test/java/com/github/sikorka/TinyLogTest.java
index bfe7fb8..8ae4cd6 100644
--- a/src/test/java/com/github/sikorka/TinyLogTest.java
+++ b/src/test/java/com/github/sikorka/TinyLogTest.java
@@ -7,10 +7,10 @@
/**
* Checks tiny-log.
*/
-public class TinyLogTest extends AbstractTinyLogTest {
+class TinyLogTest extends AbstractTinyLogTest {
@Test
- public void sayCheck() {
+ void sayCheck() {
writePlain("In the depth of logs...");
writePlain("And unnoticed messages!");
say("I am saying something.");
@@ -18,17 +18,17 @@ public void sayCheck() {
}
@Test
- public void sayLoudCheck() {
+ void sayLoudCheck() {
sayLoud("I am saying something loud, so you notice me.");
}
@Test
- public void shoutCheck() {
+ void shoutCheck() {
shout("Did you start Appium?");
}
@Test
- public void highlightCheck() {
+ void highlightCheck() {
writePlain("In the depth of logs...");
writePlain("And unnoticed messages!");
highlight("I am highlighting a problem here, so you notice me.");
@@ -36,7 +36,7 @@ public void highlightCheck() {
}
@Test
- public void highlightUppercaseTest() {
+ void highlightUppercaseTest() {
writePlain("Well, hello...");
writePlain("Let's spell this out loud:");
highlight("I AM HIGHLIGHTING A PROBLEM HERE, SO YOU NOTICE ME.");
@@ -44,7 +44,7 @@ public void highlightUppercaseTest() {
}
@Test
- public void highlightHoustonTest() {
+ void highlightHoustonTest() {
writePlain("In the depth of logs...");
writePlain("And unnoticed messages!");
highlight("Houston? We've got issues.");