Add LogSuccess

This commit is contained in:
2025-03-11 21:37:55 +01:00
parent 5a2520e3b1
commit 3a5a333c62
2 changed files with 9 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ const (
TargetPrefix = "TARGET"
PathPrefix = "PATH"
ImportantPrefix = "IMPORTANT"
SuccessPrefix = "DONE"
)
// LogInfo logs an informational message
@@ -22,6 +23,12 @@ func LogInfo(format string, args ...interface{}) {
log.Printf("%s[%s]%s %s", BGreen, InfoPrefix, Reset, message)
}
// LogSuccess logs a success message
func LogSuccess(format string, args ...interface{}) {
message := fmt.Sprintf(format, args...)
log.Printf("%s%s[%s]%s %s", BBlue, On_Blue, SuccessPrefix, Reset, message)
}
// LogSource logs a message about a source file/path with proper coloring
func LogSource(format string, args ...interface{}) {
message := fmt.Sprintf(format, args...)