Browse Source

Cosmetic and case change for logger.

Godzil 1 year ago
parent
commit
b158b87dd9
3 changed files with 15 additions and 15 deletions
  1. 7 7
      source/include/logger.h
  2. 6 6
      source/logger.cpp
  3. 2 2
      source/main.cpp

+ 7 - 7
source/include/logger.h

@@ -22,15 +22,15 @@ typedef enum LogType
     LOG_DEBUG,
 } LogType;
 
-class Logger
+class logger
 {
 public:
-    static void Log(const char *message, ...);
-    static void Error(const char *message, ...);
-    static void Warning(const char *message, ...);
-    static void Info(const char *message, ...);
-    static void Critical(const char *message, ...);
-    static void Debug(const char *message, ...);
+    static void log(const char *message, ...);
+    static void error(const char *message, ...);
+    static void warning(const char *message, ...);
+    static void info(const char *message, ...);
+    static void critical(const char *message, ...);
+    static void debug(const char *message, ...);
 };
 
 #endif /* PHYSICENGINE_LOGGER_H */

+ 6 - 6
source/logger.cpp

@@ -46,7 +46,7 @@ static void addLog(LogType type, const char *message, va_list params)
     fprintf(stderr, "\x1B[0m\n");
 }
 
-void Logger::Log(const char *message, ...)
+void logger::log(const char *message, ...)
 {
     va_list list;
     va_start(list, message);
@@ -54,7 +54,7 @@ void Logger::Log(const char *message, ...)
     va_end(list);
 }
 
-void Logger::Error(const char *message, ...)
+void logger::error(const char *message, ...)
 {
     va_list list;
     va_start(list, message);
@@ -62,7 +62,7 @@ void Logger::Error(const char *message, ...)
     va_end(list);
 }
 
-void Logger::Warning(const char *message, ...)
+void logger::warning(const char *message, ...)
 {
     va_list list;
     va_start(list, message);
@@ -70,7 +70,7 @@ void Logger::Warning(const char *message, ...)
     va_end(list);
 }
 
-void Logger::Info(const char *message, ...)
+void logger::info(const char *message, ...)
 {
     va_list list;
     va_start(list, message);
@@ -78,7 +78,7 @@ void Logger::Info(const char *message, ...)
     va_end(list);
 }
 
-void Logger::Critical(const char *message, ...)
+void logger::critical(const char *message, ...)
 {
     va_list list;
     va_start(list, message);
@@ -86,7 +86,7 @@ void Logger::Critical(const char *message, ...)
     va_end(list);
 }
 
-void Logger::Debug(const char *message, ...)
+void logger::debug(const char *message, ...)
 {
     va_list list;
     va_start(list, message);

+ 2 - 2
source/main.cpp

@@ -11,9 +11,9 @@
 
 int main(int argc, char *argv[])
 {
-    Logger::Info("Booting up Physic Engine version %s", VERSION);
+    logger::info("Booting up Physic Engine version %s", VERSION);
 
-    Logger::Info("Hello World!");
+    logger::info("Hello World!");
 
     return 0;
 }