feat(logging): add database logging support and refactor logging system
- Implement new database logging functionality with separate logs database - Refactor PostLog function to store logs in database while maintaining console output - Add new InitLogsDatabase function and related database operations - Update main.go to support separate database paths for data and logs - Add logging for user creation events
This commit is contained in:
@@ -357,6 +357,7 @@ func CreateUserHandler(w http.ResponseWriter, r *http.Request) {
|
||||
"username": user.Username,
|
||||
"type": user.Type,
|
||||
})
|
||||
postLog.Info(fmt.Sprintf("[CreateUserHandler] User \"%s\" created successfully with ID: %d", req.Username, userID))
|
||||
}
|
||||
|
||||
func RemoveUserHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user