diff --git a/entry/src/main/cangjie/src/components/ChatList.cj b/entry/src/main/cangjie/src/components/chat/ChatList.cj similarity index 92% rename from entry/src/main/cangjie/src/components/ChatList.cj rename to entry/src/main/cangjie/src/components/chat/ChatList.cj index ad03ece..aaff98c 100644 --- a/entry/src/main/cangjie/src/components/ChatList.cj +++ b/entry/src/main/cangjie/src/components/chat/ChatList.cj @@ -1,13 +1,12 @@ /** * Created on 2024/9/10 */ -package ohos_app_cangjie_entry.components +package ohos_app_cangjie_entry.components.chat internal import ohos.component.* internal import ohos.state_manage.* internal import ohos.base.* import ohos.state_macro_manage.* -import ohos_app_cangjie_entry.components.Chat.* @Component public class ChatList { diff --git a/entry/src/main/cangjie/src/components/Chat/ChatMessage.cj b/entry/src/main/cangjie/src/components/chat/ChatMessage.cj similarity index 98% rename from entry/src/main/cangjie/src/components/Chat/ChatMessage.cj rename to entry/src/main/cangjie/src/components/chat/ChatMessage.cj index aedb237..4809586 100644 --- a/entry/src/main/cangjie/src/components/Chat/ChatMessage.cj +++ b/entry/src/main/cangjie/src/components/chat/ChatMessage.cj @@ -1,7 +1,7 @@ /** * Created on 2024/9/10 */ -package ohos_app_cangjie_entry.components.Chat +package ohos_app_cangjie_entry.components.chat import std.collection.* import ohos.component.* diff --git a/entry/src/main/cangjie/src/pages/HomePage.cj b/entry/src/main/cangjie/src/pages/HomePage.cj index 19b4413..001d0fe 100644 --- a/entry/src/main/cangjie/src/pages/HomePage.cj +++ b/entry/src/main/cangjie/src/pages/HomePage.cj @@ -7,13 +7,11 @@ internal import ohos.base.* internal import ohos.component.* internal import ohos.state_manage.* import ohos.state_macro_manage.* -import ohos_app_cangjie_entry.utils.Logger @Component public class HomePage { private let TAG = "HomePage" protected func aboutToAppear() { - Logger(TAG).info("aboutToAppear") } func build() { Row() diff --git a/entry/src/main/cangjie/src/pages/SidePage.cj b/entry/src/main/cangjie/src/pages/SidePage.cj index a93700c..984ca34 100644 --- a/entry/src/main/cangjie/src/pages/SidePage.cj +++ b/entry/src/main/cangjie/src/pages/SidePage.cj @@ -7,13 +7,11 @@ internal import ohos.base.* internal import ohos.component.* internal import ohos.state_manage.* import ohos.state_macro_manage.* -import ohos_app_cangjie_entry.utils.Logger @Component public class SidePage { private let TAG: String = "SidePage" protected func aboutToAppear() { - Logger(this.TAG).info("aboutToAppear") } func build() { Row() diff --git a/entry/src/main/cangjie/src/utils/Logger.cj b/entry/src/main/cangjie/src/utils/Logger.cj deleted file mode 100644 index 08b87b6..0000000 --- a/entry/src/main/cangjie/src/utils/Logger.cj +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Created on 2024/9/7 - */ -package ohos_app_cangjie_entry.utils - -import std.log.* -import log.* -import std.console.* - -public class Logger { - private let TAG: String - private static let logger = SimpleLogger() - private static let isOutputFile: Bool = false - private static let outputFilePath: String = './logger.log' - public init(TAG: String) { - logger.setOutput(Console.stdOut) - this.TAG = TAG + ": " - } - - public func debug(message: String) { - logger.debug(this.TAG + message) - logger.flush() - } - - public func info(msg: String) { - logger.info(this.TAG + msg) - logger.flush() - } - public func warn(msg: String) { - logger.warn(this.TAG + msg) - } - public func error(msg: String) { - logger.error(this.TAG + msg) - } -}