Sfoglia il codice sorgente

add new log functions

CauseFX 5 anni fa
parent
commit
2dbc0f23cc
1 ha cambiato i file con 20 aggiunte e 6 eliminazioni
  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);
+	}
+}