瀏覽代碼

add new log functions

CauseFX 5 年之前
父節點
當前提交
2dbc0f23cc
共有 1 個文件被更改,包括 20 次插入6 次删除
  1. 20 6
      api/functions/log-functions.php

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

@@ -2,9 +2,23 @@
 
 
 trait LogFunctions
 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);
+	}
+}