Simplified the code.
Fixed the source code style of enum.
Arranged the log levels.
Fixed the miss spell in the comment.