Skip to content
Permalink
Browse files

renamed project to logbuddy

  • Loading branch information...
maciejmikosik committed Aug 21, 2016
1 parent 4e41c92 commit c4fc9adf20dbf5b2e827b3f6e414f278385c9d63
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>logger</name>
<name>logbuddy</name>
<comment></comment>
<projects>
</projects>
@@ -1,14 +1,14 @@
package com.mikosik.logger;
package com.mikosik.logbuddy;

import static java.util.Arrays.asList;

import java.util.List;

import com.mikosik.logger.logger.NoLogger;
import com.mikosik.logger.logger.SynchronizedLogger;
import com.mikosik.logger.logger.ThreadLogger;
import com.mikosik.logger.logger.TimeLogger;
import com.mikosik.logger.logger.WriterLogger;
import com.mikosik.logbuddy.logger.NoLogger;
import com.mikosik.logbuddy.logger.SynchronizedLogger;
import com.mikosik.logbuddy.logger.ThreadLogger;
import com.mikosik.logbuddy.logger.TimeLogger;
import com.mikosik.logbuddy.logger.WriterLogger;

public class Build {
public List<Class<?>> loggers = asList(
@@ -1,4 +1,4 @@
package com.mikosik.logger;
package com.mikosik.logbuddy;

public class Depth {
private final ThreadLocal<Integer> depth = new ThreadLocal<Integer>() {
@@ -1,4 +1,4 @@
package com.mikosik.logger;
package com.mikosik.logbuddy;

public interface Logger {
void log(String message);
@@ -1,4 +1,4 @@
package com.mikosik.logger;
package com.mikosik.logbuddy;

import static java.lang.String.format;
import static java.util.Arrays.stream;
@@ -1,6 +1,6 @@
package com.mikosik.logger;
package com.mikosik.logbuddy;

import com.mikosik.logger.logger.NoLogger;
import com.mikosik.logbuddy.logger.NoLogger;

public class NoLogging extends Logging {
public NoLogging() {
@@ -1,6 +1,6 @@
package com.mikosik.logger.logger;
package com.mikosik.logbuddy.logger;

import com.mikosik.logger.Logger;
import com.mikosik.logbuddy.Logger;

public class NoLogger implements Logger {
public void log(String message) {}
@@ -1,8 +1,8 @@
package com.mikosik.logger.logger;
package com.mikosik.logbuddy.logger;

import static java.util.Objects.requireNonNull;

import com.mikosik.logger.Logger;
import com.mikosik.logbuddy.Logger;

public class SynchronizedLogger implements Logger {
private final Logger logger;
@@ -1,8 +1,8 @@
package com.mikosik.logger.logger;
package com.mikosik.logbuddy.logger;

import static java.lang.String.format;

import com.mikosik.logger.Logger;
import com.mikosik.logbuddy.Logger;

public class ThreadLogger implements Logger {
private final Logger logger;
@@ -1,4 +1,4 @@
package com.mikosik.logger.logger;
package com.mikosik.logbuddy.logger;

import static java.lang.String.format;
import static java.time.format.DateTimeFormatter.ISO_LOCAL_DATE;
@@ -12,7 +12,7 @@
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;

import com.mikosik.logger.Logger;
import com.mikosik.logbuddy.Logger;

public class TimeLogger implements Logger {
private final Clock clock;
@@ -1,12 +1,12 @@
package com.mikosik.logger.logger;
package com.mikosik.logbuddy.logger;

import static java.util.Objects.requireNonNull;

import java.io.IOException;
import java.io.UncheckedIOException;
import java.io.Writer;

import com.mikosik.logger.Logger;
import com.mikosik.logbuddy.Logger;

public class WriterLogger implements Logger {
private final Writer writer;
@@ -4,7 +4,7 @@ HERE=`dirname ${0}`
cd "${HERE}/.."
PROJECT=`pwd`
RUN="${PROJECT}/run"
BUILDING="/tmp/build_logger"
BUILDING="/tmp/build_logbuddy"

MAIN="${PROJECT}/main"
JAVA="${MAIN}/java"
@@ -27,7 +27,7 @@ javac \
-source 1.8 \
-target 1.8 \
-d "${BUILDING}" \
"${JAVA}/com/mikosik/logger/Build.java"
"${JAVA}/com/mikosik/logbuddy/Build.java"

########## COPY SOURCES ##########
cp \
@@ -59,21 +59,21 @@ cd ${BUILDING}
zip \
--quiet \
--recurse-paths \
./logging.jar \
./logbuddy.jar \
./*
cd "${PROJECT}"

########## INLINE DEPENDENCIES ##########
java \
-jar "${RUN}/jarjar-1.4.jar" \
process "${RUN}/jarjar-rules.txt" \
"${BUILDING}/logging.jar" \
"${BUILDING}/logging.jar"
"${BUILDING}/logbuddy.jar" \
"${BUILDING}/logbuddy.jar"


echo ""
echo "BUILD SUCCESSFUL"
echo "created ${BUILDING}/logging.jar"
echo "sha1sum=`sha1sum ${BUILDING}/logging.jar | cut -f1 -d' '`"
echo "created ${BUILDING}/logbuddy.jar"
echo "sha1sum=`sha1sum ${BUILDING}/logbuddy.jar | cut -f1 -d' '`"


@@ -1,4 +1,4 @@
package com.mikosik.logger;
package com.mikosik.logbuddy;

import static java.util.Arrays.asList;
import static org.hamcrest.Matchers.containsString;
@@ -1,4 +1,4 @@
package com.mikosik.logger;
package com.mikosik.logbuddy;

import static java.util.Arrays.asList;
import static java.util.Collections.synchronizedList;
@@ -1,4 +1,4 @@
package com.mikosik.logger;
package com.mikosik.logbuddy;

import static org.testory.Testory.given;
import static org.testory.Testory.givenTest;
@@ -1,6 +1,6 @@
package com.mikosik.logger.logger;
package com.mikosik.logbuddy.logger;

import static com.mikosik.logger.logger.SynchronizedLogger.synchronize;
import static com.mikosik.logbuddy.logger.SynchronizedLogger.synchronize;
import static org.testory.Testory.given;
import static org.testory.Testory.givenTest;
import static org.testory.Testory.thenCalled;
@@ -11,7 +11,7 @@
import org.junit.Before;
import org.junit.Test;

import com.mikosik.logger.Logger;
import com.mikosik.logbuddy.Logger;

public class TestSynchronizedLogger {
private String message;
@@ -1,6 +1,6 @@
package com.mikosik.logger.logger;
package com.mikosik.logbuddy.logger;

import static com.mikosik.logger.logger.ThreadLogger.thread;
import static com.mikosik.logbuddy.logger.ThreadLogger.thread;
import static java.lang.String.format;
import static org.testory.Testory.given;
import static org.testory.Testory.givenTest;
@@ -10,7 +10,7 @@
import org.junit.Before;
import org.junit.Test;

import com.mikosik.logger.Logger;
import com.mikosik.logbuddy.Logger;

public class TestThreadLogger {
private Logger logger, threadLogger;
@@ -1,6 +1,6 @@
package com.mikosik.logger.logger;
package com.mikosik.logbuddy.logger;

import static com.mikosik.logger.logger.TimeLogger.time;
import static com.mikosik.logbuddy.logger.TimeLogger.time;
import static java.time.Clock.fixed;
import static org.hamcrest.Matchers.containsString;
import static org.testory.Testory.any;
@@ -18,7 +18,7 @@
import org.junit.Before;
import org.junit.Test;

import com.mikosik.logger.Logger;
import com.mikosik.logbuddy.Logger;

public class TestTimeLogger {
private String message;
@@ -1,6 +1,6 @@
package com.mikosik.logger.logger;
package com.mikosik.logbuddy.logger;

import static com.mikosik.logger.logger.WriterLogger.logger;
import static com.mikosik.logbuddy.logger.WriterLogger.logger;
import static org.testory.Testory.given;
import static org.testory.Testory.givenTest;
import static org.testory.Testory.thenEqual;
@@ -15,7 +15,7 @@
import org.junit.Before;
import org.junit.Test;

import com.mikosik.logger.Logger;
import com.mikosik.logbuddy.Logger;

public class TestWriterLogger {
private Writer writer;

0 comments on commit c4fc9ad

Please sign in to comment.
You can’t perform that action at this time.