Created
June 22, 2013 00:25
-
-
Save positlabs/5835291 to your computer and use it in GitHub Desktop.
Simple logging for Java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple Java logger | |
* | |
* new Log("hey", "guys"); | |
* >>> hey guys | |
* | |
* Separator defaults to a space, but you can specify a new separator | |
* Log.separator(" you "); | |
* new Log("hey", "guys"); | |
* >>> hey you guys | |
* | |
* */ | |
public final class Log { | |
public static String separator = " "; | |
Log(String... args){ | |
String s = ""; | |
for (String string : args) { | |
s += string + separator; | |
} | |
System.out.println(s); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Need to overload constructor to accept any type of arguments