Skip to content

Instantly share code, notes, and snippets.

@positlabs
Created June 22, 2013 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save positlabs/5835291 to your computer and use it in GitHub Desktop.
Save positlabs/5835291 to your computer and use it in GitHub Desktop.
Simple logging for Java
/**
* 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);
}
}
@positlabs
Copy link
Author

Need to overload constructor to accept any type of arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment