added SetLoggingLevel func, and SecurityLevel log

This commit is contained in:
2022-12-10 20:44:33 -05:00
parent 4db3de09b4
commit 253e6a20d8
2 changed files with 70 additions and 17 deletions

View File

@@ -8,6 +8,7 @@ import (
// Fatal One or more key business functionalities are not working and the whole system doesnt fulfill the business functionalities.
// Error One or more functionalities are not working, preventing some functionalities from working correctly.
// Warn Unexpected behavior happened inside the application, but it is continuing its work and the key business features are operating as expected.
// Security A violation of the app's security practises
// Info An event happened, the event is purely informative and can be ignored during normal operations.
// Debug A log level used for events considered to be useful during software debugging when more granular information is needed.
// Trace A log level describing events showing step by step execution of your code that can be ignored during the standard operation, but may be useful during extended debugging sessions.
@@ -20,6 +21,7 @@ const (
TraceLevel
DebugLevel
InfoLevel
SecurityLevel
WarnLevel
ErrorLevel
FatalLevel
@@ -35,6 +37,7 @@ type LevelLogger struct {
traceLog *log.Logger
debugLog *log.Logger
infoLog *log.Logger
securityLog *log.Logger
warnLog *log.Logger
errorLog *log.Logger
fatalLog *log.Logger