22 * @file log.hpp
33 * @brief Cargo-style logging utilities for cforge
44 *
5- * Output format matches Rust's Cargo :
5+ * Output format matches Rust's CARGO :
66 * - 12-character right-aligned status word (colored)
77 * - Message follows in default color
88 * - No emojis, no brackets
@@ -62,16 +62,16 @@ enum class log_verbosity {
6262 * @class logger
6363 * @brief Static class providing Cargo-style logging functionality
6464 *
65- * All output follows Cargo 's format:
65+ * All output follows CARGO 's format:
6666 * {status:>12} {message}
6767 *
6868 * Where status is a colored action word like "Compiling", "Building", etc.
6969 */
7070class logger {
7171public:
72- // ============================================================
72+
7373 // Configuration
74- // ============================================================
74+
7575
7676 /* *
7777 * @brief Sets the global verbosity level for logging
@@ -85,9 +85,8 @@ class logger {
8585 */
8686 static log_verbosity get_verbosity ();
8787
88- // ============================================================
89- // Cargo-style status messages (right-aligned status word)
90- // ============================================================
88+ // CARGO-style status messages (right-aligned status word)
89+
9190
9291 /* *
9392 * @brief Print a status message with custom action word
@@ -104,7 +103,7 @@ class logger {
104103 /* *
105104 * @brief Print a cyan status message (info/progress)
106105 *
107- * Common actions: "Checking", "Fetching", "Updating", "Running "
106+ * Common actions: "Checking", "Fetching", "Updating", "RUNNING "
108107 */
109108 static void print_status (const std::string &message);
110109
@@ -130,9 +129,7 @@ class logger {
130129 */
131130 static void print_verbose (const std::string &message);
132131
133- // ============================================================
134- // Specific action helpers (Cargo-style)
135- // ============================================================
132+ // Specific action helpers (CARGO-style)
136133
137134 /* *
138135 * @brief Print "Compiling {target}"
@@ -145,7 +142,7 @@ class logger {
145142 static void building (const std::string &target);
146143
147144 /* *
148- * @brief Print "Running {command}"
145+ * @brief Print "RUNNING {command}"
149146 */
150147 static void running (const std::string &command);
151148
@@ -214,17 +211,17 @@ class logger {
214211 */
215212 static void cleaning (const std::string &target);
216213
217- // ============================================================
214+
218215 // Build progress display (Rust-style)
219- // ============================================================
216+
220217
221218 /* *
222219 * @brief Print "Compiling {file}" with optional timing
223220 * @param file The file being compiled
224221 * @param duration_secs Optional duration in seconds (for completed files)
225222 */
226223 static void compiling_file (const std::string &file,
227- double duration_secs = -1.0 );
224+ cforge_double_t duration_secs = -1.0 );
228225
229226 /* *
230227 * @brief Display a progress bar
@@ -245,12 +242,12 @@ class logger {
245242 * @param slowest_files Vector of (filename, duration) pairs for slowest files
246243 */
247244 static void print_timing_summary (
248- double total_duration,
249- const std::vector<std::pair<std::string, double >> &slowest_files);
245+ cforge_double_t total_duration,
246+ const std::vector<std::pair<std::string, cforge_double_t >> &slowest_files);
247+
250248
251- // ============================================================
252249 // Legacy compatibility (maps to new style)
253- // ============================================================
250+
254251
255252 /* *
256253 * @brief Print a header/banner (simplified, no box drawing)
@@ -275,7 +272,7 @@ class logger {
275272private:
276273 static log_verbosity s_verbosity;
277274
278- // Status width for right-alignment (Cargo uses 12)
275+ // Status width for right-alignment (CARGO uses 12)
279276 static constexpr int STATUS_WIDTH = 12 ;
280277
281278 /* *
0 commit comments