Skip to content

Commit

Permalink
Add document comment to mark()
Browse files Browse the repository at this point in the history
  • Loading branch information
xtyxtyx committed Jan 2, 2025
1 parent b0a4286 commit 233b810
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Sources/Shaft/Foundation/Print.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
import Foundation
import Rainbow

/// Prints a formatted message with file, function, and line information.
///
/// This function is used for logging and debugging purposes. It prints a
/// message with the current time, file path, function name, and line number.
/// The message is colored and formatted for easy reading.
public func mark(
_ message: Any...,
file: String = #file,
Expand All @@ -24,11 +29,3 @@ public func mark(
let fileinfo = "[\(relativePath):\(line)]"
print("\("INFO".green) \(time.cyan) \(fileinfo.magenta) \(function.yellow): \(message)")
}

// private func _toString<T>(_ value: T) -> String {
// if let value = value as? CustomStringConvertible {
// return value.description
// } else {
// return "\(value)"
// }
// }

0 comments on commit 233b810

Please sign in to comment.