From c18a1a855b384942a979eb7f18a2fd5ef3da5fb7 Mon Sep 17 00:00:00 2001 From: PrajwalHM-Gaargesh <62995073+PrajwalHM-Gaargesh@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:48:55 +0530 Subject: [PATCH 1/5] Update README.md Quick Start section 2 Modified the initialize function declaration to accept a string parameter in README.md. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9ae51bf..57544cc 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ target_link_libraries(your_target PRIVATE logcoe) int main() { // Initialize with INFO level, console enabled, file disabled - logcoe::initialize(logcoe::LogLevel::INFO, true, false); + logcoe::initialize(logcoe::LogLevel::INFO, std::string{}, true, false); logcoe::info("Application started"); logcoe::warning("This is a warning message"); @@ -65,7 +65,7 @@ int main() { int main() { // Enable both console and file output with DEBUG level - logcoe::initialize(logcoe::LogLevel::DEBUG, true, true, "app.log"); + logcoe::initialize(logcoe::LogLevel::DEBUG, std::string{},true, true, "app.log"); // Customize time format logcoe::setTimeFormat("%H:%M:%S"); @@ -209,4 +209,4 @@ int main() { ## License -MIT License - see [LICENSE](LICENSE) file for details. \ No newline at end of file +MIT License - see [LICENSE](LICENSE) file for details. From d8174c4191a80690584838838a9a0426ca81b472 Mon Sep 17 00:00:00 2001 From: PrajwalHM-Gaargesh <62995073+PrajwalHM-Gaargesh@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:27:26 +0530 Subject: [PATCH 2/5] Address review comments by nircoe for README.md Add comments under examples to highlight the default source when a value is provided and when it's an empty string. --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 57544cc..9b279b5 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,8 @@ target_link_libraries(your_target PRIVATE logcoe) #include int main() { - // Initialize with INFO level, console enabled, file disabled + // Initialize with INFO level, no default source (empty string), console enabled, file disabled + // logs will be printed as [timestamp] [log_level]: logcoe::initialize(logcoe::LogLevel::INFO, std::string{}, true, false); logcoe::info("Application started"); @@ -64,8 +65,9 @@ int main() { #include int main() { - // Enable both console and file output with DEBUG level - logcoe::initialize(logcoe::LogLevel::DEBUG, std::string{},true, true, "app.log"); + // Enable both console and file output with DEBUG level and default source as logcoe + // logs will be printed as [timestamp] [log_level] [logcoe]: + logcoe::initialize(logcoe::LogLevel::DEBUG, "logcoe", true, true, "app.log"); // Customize time format logcoe::setTimeFormat("%H:%M:%S"); From 39078292e978da8d47d2dcb1f48454a5287a8580 Mon Sep 17 00:00:00 2001 From: PrajwalHM-Gaargesh <62995073+PrajwalHM-Gaargesh@users.noreply.github.com> Date: Wed, 6 Aug 2025 10:20:46 +0530 Subject: [PATCH 3/5] Add the default source to the initialization section of the README.md. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9b279b5..ce2f99d 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ logcoe::initialize(); // Full configuration logcoe::initialize( logcoe::LogLevel::DEBUG, // Log level + "logcoe", //default source true, // Enable console true, // Enable file "application.log" // Filename From 9632bf3f60e6f61e123c833afa99e81d958a4830 Mon Sep 17 00:00:00 2001 From: PrajwalHM-Gaargesh <62995073+PrajwalHM-Gaargesh@users.noreply.github.com> Date: Wed, 6 Aug 2025 10:23:13 +0530 Subject: [PATCH 4/5] Add the default source to the Thread safety section of the README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce2f99d..dfaa42a 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ void worker_thread(int id) { } int main() { - logcoe::initialize(logcoe::LogLevel::INFO, false, true, "concurrent.log"); + logcoe::initialize(logcoe::LogLevel::INFO, std::string{}, false, true, "concurrent.log"); std::vector workers; for (int i = 0; i < 10; ++i) { From 79648b1ccb3cf5a3b82d08c92fdb836316ef61cc Mon Sep 17 00:00:00 2001 From: PrajwalHM-Gaargesh <62995073+PrajwalHM-Gaargesh@users.noreply.github.com> Date: Thu, 7 Aug 2025 11:15:36 +0530 Subject: [PATCH 5/5] Address review comments --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dfaa42a..ab9d602 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ logcoe::initialize(); // Full configuration logcoe::initialize( logcoe::LogLevel::DEBUG, // Log level - "logcoe", //default source + "logcoe", // Default source true, // Enable console true, // Enable file "application.log" // Filename @@ -176,7 +176,7 @@ void worker_thread(int id) { } int main() { - logcoe::initialize(logcoe::LogLevel::INFO, std::string{}, false, true, "concurrent.log"); + logcoe::initialize(logcoe::LogLevel::INFO, std::string{}, false, true, "concurrent.log"); std::vector workers; for (int i = 0; i < 10; ++i) {