From a9eb569a02405c260662b1319589c0824e3e0a60 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Mon, 30 Jan 2023 02:59:55 +0100 Subject: [PATCH] moved log to own package --- src/kernel/Entrypoint.hx | 2 ++ src/kernel/KernelEvents.hx | 1 + src/kernel/{ => log}/Log.hx | 2 +- src/kernel/{ => log}/LogLevel.hx | 2 +- src/kernel/{ => log}/LogLine.hx | 4 +--- src/kernel/net/Loopback.hx | 1 + src/kernel/net/Net.hx | 2 +- src/kernel/net/Routing.hx | 1 + src/kernel/turtle/Turtle.hx | 1 + src/lib/Debug.hx | 2 +- 10 files changed, 11 insertions(+), 7 deletions(-) rename src/kernel/{ => log}/Log.hx (98%) rename src/kernel/{ => log}/LogLevel.hx (74%) rename src/kernel/{ => log}/LogLine.hx (63%) diff --git a/src/kernel/Entrypoint.hx b/src/kernel/Entrypoint.hx index eef56dd..c71b323 100644 --- a/src/kernel/Entrypoint.hx +++ b/src/kernel/Entrypoint.hx @@ -1,5 +1,7 @@ package kernel; +import kernel.log.Log; + class Entrypoint { public static function main() { Init.initKernel(); diff --git a/src/kernel/KernelEvents.hx b/src/kernel/KernelEvents.hx index 7018fa0..9060a78 100644 --- a/src/kernel/KernelEvents.hx +++ b/src/kernel/KernelEvents.hx @@ -1,5 +1,6 @@ package kernel; +import kernel.log.Log; import lib.Pos; import cc.HTTP.HTTPResponse; import lua.TableTools; diff --git a/src/kernel/Log.hx b/src/kernel/log/Log.hx similarity index 98% rename from src/kernel/Log.hx rename to src/kernel/log/Log.hx index 7354c7f..dc35ad5 100644 --- a/src/kernel/Log.hx +++ b/src/kernel/log/Log.hx @@ -1,4 +1,4 @@ -package kernel; +package kernel.log; #if webconsole import lib.Debug; diff --git a/src/kernel/LogLevel.hx b/src/kernel/log/LogLevel.hx similarity index 74% rename from src/kernel/LogLevel.hx rename to src/kernel/log/LogLevel.hx index b7fd7d2..0e45fa1 100644 --- a/src/kernel/LogLevel.hx +++ b/src/kernel/log/LogLevel.hx @@ -1,4 +1,4 @@ -package kernel; +package kernel.log; enum LogLevel { Info; diff --git a/src/kernel/LogLine.hx b/src/kernel/log/LogLine.hx similarity index 63% rename from src/kernel/LogLine.hx rename to src/kernel/log/LogLine.hx index 348048e..5a5c248 100644 --- a/src/kernel/LogLine.hx +++ b/src/kernel/log/LogLine.hx @@ -1,6 +1,4 @@ -package kernel; - -import kernel.LogLevel; +package kernel.log; typedef LogLine = { level: LogLevel, diff --git a/src/kernel/net/Loopback.hx b/src/kernel/net/Loopback.hx index bdd12a3..1331e35 100644 --- a/src/kernel/net/Loopback.hx +++ b/src/kernel/net/Loopback.hx @@ -1,5 +1,6 @@ package kernel.net; +import kernel.log.Log; using tink.CoreApi; /** diff --git a/src/kernel/net/Net.hx b/src/kernel/net/Net.hx index 51ab922..fd96a14 100644 --- a/src/kernel/net/Net.hx +++ b/src/kernel/net/Net.hx @@ -3,7 +3,7 @@ package kernel.net; import haxe.ds.ReadOnlyArray; import kernel.net.Package.NetworkID; import kernel.peripherals.Peripherals.Peripheral; -import kernel.Log; +import kernel.log.Log; import kernel.Timer; import cc.OS; diff --git a/src/kernel/net/Routing.hx b/src/kernel/net/Routing.hx index 4728ad1..89ca0e8 100644 --- a/src/kernel/net/Routing.hx +++ b/src/kernel/net/Routing.hx @@ -1,5 +1,6 @@ package kernel.net; +import kernel.log.Log; import kernel.peripherals.Peripherals.Peripheral; import kernel.net.INetworkInterface; import kernel.net.Package.NetworkID; diff --git a/src/kernel/turtle/Turtle.hx b/src/kernel/turtle/Turtle.hx index 340fbe0..94b1015 100644 --- a/src/kernel/turtle/Turtle.hx +++ b/src/kernel/turtle/Turtle.hx @@ -1,5 +1,6 @@ package kernel.turtle; +import kernel.log.Log; import kernel.turtle.Types; using tink.CoreApi; diff --git a/src/lib/Debug.hx b/src/lib/Debug.hx index 71e822a..cdd8ff8 100644 --- a/src/lib/Debug.hx +++ b/src/lib/Debug.hx @@ -1,9 +1,9 @@ package lib; +import kernel.log.Log; import lua.NativeStringTools; import lib.ui.Canvas; import cc.ComputerCraft; -import kernel.Log; #if webconsole import cc.HTTP; import kernel.net.Net;