mirror of
https://github.com/HighCapable/Gropify.git
synced 2025-12-16 08:01:09 +08:00
52 lines
1.4 KiB
Kotlin
52 lines
1.4 KiB
Kotlin
/*
|
|
* Gropify - A type-safe and modern properties plugin for Gradle.
|
|
* Copyright (C) 2019 HighCapable
|
|
* https://github.com/HighCapable/Gropify
|
|
*
|
|
* Apache License Version 2.0
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* https://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*
|
|
* This file is created by fankes on 2025/10/16.
|
|
*/
|
|
@file:Suppress("unused", "LoggingStringTemplateAsArgument")
|
|
|
|
package com.highcapable.gropify.debug
|
|
|
|
import com.highcapable.gropify.plugin.Gropify
|
|
|
|
/**
|
|
* Gropify logger.
|
|
*/
|
|
internal object Logger {
|
|
|
|
/** Debug mode flag. */
|
|
var debugMode = false
|
|
|
|
fun debug(msg: Any) {
|
|
if (!debugMode) return
|
|
println("\u001B[36m[${Gropify.TAG}][DEBUG] $msg\u001B[0m")
|
|
}
|
|
|
|
fun info(msg: Any) {
|
|
println("${Gropify.TAG}][INFO] $msg")
|
|
}
|
|
|
|
fun warn(msg: Any) {
|
|
println("\u001B[33m[${Gropify.TAG}][WARN] $msg\u001B[0m")
|
|
}
|
|
|
|
fun error(msg: Any) {
|
|
println("\u001B[31m[${Gropify.TAG}][ERROR] $msg\u001B[0m")
|
|
}
|
|
} |