-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring the code and adding comments for better understaning of t…
…he code
- Loading branch information
Showing
12 changed files
with
248 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
#ifndef LOGGING_H | ||
#define LOGGING_H | ||
|
||
/** | ||
* Represents a log level | ||
*/ | ||
typedef enum LogLevel LogLevel; | ||
enum LogLevel { | ||
FATAL, ERROR, WARNING, INFO | ||
}; | ||
|
||
void server_log(LogLevel, const char*, ...); | ||
/** | ||
* Logs the message same as printf but adds time and log level to the beginning of the message | ||
* @param ... printf arguments | ||
*/ | ||
void server_log(LogLevel, const char *, ...); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.