Skip to content

Commit

Permalink
The hunt.logging.ConsoleLogger is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Heromyth committed Dec 24, 2021
1 parent 0f160c4 commit 6fe5cbe
Show file tree
Hide file tree
Showing 52 changed files with 81 additions and 60 deletions.
2 changes: 1 addition & 1 deletion examples/collection/source/SetDemo.d
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import hunt.collection.SortedSet;
import hunt.collection.TreeSet;

import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.UnitTest;
import hunt.util.Common;
import hunt.Assert;
Expand Down
2 changes: 1 addition & 1 deletion examples/collection/source/test/ArrayListDemo.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import hunt.collection.ArrayList;
import hunt.collection.Collections;
import hunt.collection.List;

import hunt.logging.ConsoleLogger;
import hunt.logging;

import std.stdio;
import std.conv;
Expand Down
6 changes: 3 additions & 3 deletions examples/test/source/app.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import hunt.concurrency.thread;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.system.Locale;
import hunt.system.Memory;
import hunt.system.TimeZone;
Expand Down Expand Up @@ -71,7 +71,7 @@ void main()
// //
// // testUnits!(PathMatcherTest);
// testUnits!(StringTokenizerTest);
testUnits!(ThreadTest);
// testUnits!(ThreadTest);

// // These tests belown will block the test procession.

Expand All @@ -83,7 +83,7 @@ void main()
// testUnits!(ScheduledThreadPoolTest);
// testUnits!(ThreadPoolExecutorTest);
// testUnits!(ConverterUtilsTest);
// testUnits!(DeductionTest);
testUnits!(DeductionTest);

// testUnits!(JsonSerializerTest);
// testUnits!(SerializationTest);
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/benchmark/LinkedBlockingQueueBench.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import HuntQueue = hunt.collection.Queue;
import hunt.io.SimpleQueue;

import hunt.util.DateTime;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import core.thread;
import std.stdio;

Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/common.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module common;

import hunt.serialization.Common;
import hunt.serialization.JsonSerializer;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.Common;
import hunt.util.CompilerHelper;
import hunt.util.ObjectUtils;
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/AtomicTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module test.AtomicTest;

import common;
import hunt.concurrency.atomic;
import hunt.logging.ConsoleLogger;
import hunt.logging;

import core.atomic;

Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/ByteBufferTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import hunt.util.ByteOrder;

import hunt.Byte;

import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.Assert;

import std.conv;
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/ConverterUtilsTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import hunt.util.ConverterUtils;

import hunt.Assert;
import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;

import std.format;

Expand Down
31 changes: 26 additions & 5 deletions examples/test/source/test/DeductionTest.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module test.DeductionTest;

import common;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.Traits;

import std.conv;
Expand All @@ -28,10 +28,10 @@ class DeductionTest {
// deduce(greetings);
// }

{
GreetingBase[2] greetings;
deduce(greetings);
}
// {
// GreetingBase[2] greetings;
// deduce(greetings);
// }
}

// void testConstructor() {
Expand All @@ -42,6 +42,10 @@ class DeductionTest {
// deduce(ex);
// }

void testNullable() {
Nullable!int a;
deduce(a);
}


// void test2() {
Expand All @@ -51,12 +55,29 @@ class DeductionTest {
}

import std.typecons;
import std.variant;

/**
Flag indicating whether a search is case-sensitive.
*/
alias CaseSensitive = Flag!"caseSensitive";

// void deduce(T : Nullable!U, U)(T a) {
// tracef("T:%s, U: %s", T.stringof, U.stringof);
// }

void deduce(T)(T a) {
static if(is(T : Nullable!U, U)) {
tracef("T:%s, U: %s", T.stringof, U.stringof);
} else {
error("bad");
}

Variant currentColumnValue = 2;

T v = currentColumnValue.coerce!T();

}

void deduce(T, CaseSensitive sensitive = CaseSensitive.yes)(T v) { // if(!is(T == class))
trace(sensitive);
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/JsonSerializerTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import common;
import hunt.util.Common;

import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.UnitTest;
import hunt.serialization.Common;
import hunt.serialization.JsonSerializer;
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/LinkedBlockingQueueTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module test.LinkedBlockingQueueTest;

import hunt.concurrency.LinkedBlockingQueue;
import hunt.util.DateTime;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.Exceptions;

import core.thread;
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/LocaleTest.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module test.LocaleTest;

import hunt.util.Locale;
import hunt.logging.ConsoleLogger;
import hunt.logging;

class LocaleTest {

Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/ObjectMappingTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import hunt.util.CompilerHelper;
static if(CompilerHelper.isGreaterThan (2086)) {

import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.ObjectUtils;
import hunt.util.UnitTest;

Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/PromiseTest.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module test.PromiseTest;

import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.UnitTest;

import hunt.concurrency.FuturePromise;
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/PropertySetterTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module test.PropertySetterTest;

import hunt.util.ObjectUtils;
import hunt.util.ObjectUtils;
import hunt.logging.ConsoleLogger;
import hunt.logging;

struct Foo {
string name = "dog";
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/ScheduledThreadPoolTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import hunt.util.DateTime;
import hunt.Exceptions;
import hunt.util.Common;
import hunt.util.Runnable;
import hunt.logging.ConsoleLogger;
import hunt.logging;

import hunt.util.CompilerHelper;
static if(CompilerHelper.isGreaterThan(2093)) {
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/SerializationTest.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module test.SerializationTest;

import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.serialization.BinarySerialization;
import hunt.util.Common;
import hunt.util.ObjectUtils;
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/StringTokenizerTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module test.StringTokenizerTest;
import hunt.text.StringTokenizer;

import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.UnitTest;
import hunt.Assert;

Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/TaskPoolTest.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module test.TaskPoolTest;

import hunt.util.TaskPool;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.io.SimpleQueue;
import hunt.system.Memory;
import hunt.util.Common;
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/ThreadPoolExecutorTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import hunt.util.DateTime;
import hunt.Exceptions;
import hunt.util.Common;
import hunt.util.Runnable;
import hunt.logging.ConsoleLogger;
import hunt.logging;

import hunt.util.CompilerHelper;
static if(CompilerHelper.isGreaterThan(2093)) {
Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/ThreadPoolTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import std.stdio;
import hunt.util.pool;
import hunt.util.thread;

import hunt.logging.ConsoleLogger;
import hunt.logging;

import core.thread;

Expand Down
2 changes: 1 addition & 1 deletion examples/test/source/test/ThreadTest.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module test.ThreadTest;

import hunt.concurrency.thread;
import hunt.concurrency.FutureTask;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.Common;
import hunt.util.UnitTest;

Expand Down
2 changes: 1 addition & 1 deletion source/hunt/Enum.d
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ T valueOf(T)(string name, T defaultValue = T.init) if(is(T : Enum!(T))) {
if(t.name() == %2$s) return t;
}
import hunt.logging.ConsoleLogger;
import hunt.logging;
warning("Can't locate the member: " ~ %2$s ~ " in " ~ typeid(T).name ~ ".%1$s");
return %3$s;`, memberName, paramName, defaultValue);

Expand Down
2 changes: 1 addition & 1 deletion source/hunt/collection/AbstractCollection.d
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import std.array;
import std.conv;
import std.range;

import hunt.logging.ConsoleLogger;
import hunt.logging;

/**
* This class provides a skeletal implementation of the {@code Collection}
Expand Down
2 changes: 1 addition & 1 deletion source/hunt/collection/TreeMap.d
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import std.range;
import std.traits;


version (HUNT_DEBUG) import hunt.logging.ConsoleLogger;
version (HUNT_DEBUG) import hunt.logging;

// Red-black mechanics

Expand Down
2 changes: 1 addition & 1 deletion source/hunt/concurrency/AbstractExecutorService.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import hunt.collection.Iterator;
import hunt.collection.List;

import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.Common;
import hunt.util.DateTime;
import hunt.util.Runnable;
Expand Down
2 changes: 1 addition & 1 deletion source/hunt/concurrency/Executors.d
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import hunt.concurrency.ThreadPoolExecutor;

import hunt.collection.List;
import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.Common;
import hunt.util.CompilerHelper;
import hunt.util.DateTime;
Expand Down
2 changes: 1 addition & 1 deletion source/hunt/concurrency/FuturePromise.d
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import hunt.concurrency.Future;
import hunt.concurrency.Promise;

import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;

import core.atomic;
import core.thread;
Expand Down
2 changes: 1 addition & 1 deletion source/hunt/concurrency/FutureTask.d
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static if(CompilerHelper.isGreaterThan(2093)) {
import core.time;

import hunt.concurrency.thread;
import hunt.logging.ConsoleLogger;
import hunt.logging;


/**
Expand Down
2 changes: 1 addition & 1 deletion source/hunt/concurrency/LinkedBlockingQueue.d
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import core.sync.mutex;
import core.sync.condition;
import core.time;

import hunt.logging.ConsoleLogger;
import hunt.logging;

/**
* An optionally-bounded {@linkplain BlockingQueue blocking queue} based on
Expand Down
2 changes: 1 addition & 1 deletion source/hunt/concurrency/ScheduledThreadPoolExecutor.d
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import hunt.util.Common;
import hunt.util.DateTime;
import hunt.util.Runnable;
import hunt.Object;
import hunt.logging.ConsoleLogger;
import hunt.logging;
// import core.time;

import core.atomic;
Expand Down
2 changes: 1 addition & 1 deletion source/hunt/concurrency/ThreadPoolExecutor.d
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import core.thread;
import std.algorithm;
import std.conv;

import hunt.logging.ConsoleLogger;
import hunt.logging;

// import hunt.collection.ArrayList;
// import java.util.ConcurrentModificationException;
Expand Down
2 changes: 1 addition & 1 deletion source/hunt/concurrency/thread/LockSupport.d
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import core.time;

import hunt.concurrency.thread.ThreadEx;
import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.util.DateTime;


Expand Down
2 changes: 1 addition & 1 deletion source/hunt/concurrency/thread/ThreadEx.d
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import hunt.concurrency.thread.LockSupport;

import hunt.Exceptions;
import hunt.Functions;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.system.Memory;
import hunt.util.Common;
import hunt.util.DateTime;
Expand Down
2 changes: 1 addition & 1 deletion source/hunt/stream/BufferedOutputStream.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module hunt.stream.BufferedOutputStream;

import hunt.stream.Common;
import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;

/**
*
Expand Down
2 changes: 1 addition & 1 deletion source/hunt/stream/FileOutputStream.d
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
module hunt.stream.FileOutputStream;

import hunt.Exceptions;
import hunt.logging.ConsoleLogger;
import hunt.logging;
import hunt.stream.Common;

import std.array;
Expand Down
Loading

0 comments on commit 6fe5cbe

Please sign in to comment.