Explorar o código

add new log functions

CauseFX %!s(int64=5) %!d(string=hai) anos
pai
achega
2dbc0f23cc
Modificáronse 1 ficheiros con 20 adicións e 6 borrados
  1. 20 6
      api/functions/log-functions.php

+ 20 - 6
api/functions/log-functions.php

@@ -2,9 +2,23 @@
 
 trait LogFunctions
 {
-
-}
-
-
-
-
+	public function info($msg, $username = null)
+	{
+		$this->writeLog('info', $msg, $username);
+	}
+	
+	public function error($msg, $username = null)
+	{
+		$this->writeLog('error', $msg, $username);
+	}
+	
+	public function warning($msg, $username = null)
+	{
+		$this->writeLog('warning', $msg, $username);
+	}
+	
+	public function debug($msg, $username = null)
+	{
+		$this->writeLog('debug', $msg, $username);
+	}
+}