3
|
1 local Luan = require "luan:Luan.luan"
|
|
2 local error = Luan.error
|
|
3 local String = require "luan:String.luan"
|
|
4 local trim = String.trim or error()
|
|
5 local regex = String.regex or error()
|
|
6 local contains = String.contains or error()
|
|
7 local Http = require "luan:http/Http.luan"
|
|
8 local Logging = require "luan:logging/Logging.luan"
|
|
9 local logger = Logging.logger "error_log.js"
|
|
10
|
|
11
|
|
12 local function priority(err)
|
|
13 return "error"
|
|
14 end
|
|
15
|
|
16 return function()
|
|
17 local err = Http.request.parameters.err
|
|
18 if err == nil then
|
|
19 return -- stupid bots
|
|
20 end
|
|
21 local call = priority(err)
|
|
22 logger[call](trim(err).."\n"..trim(Http.request.raw_head).."\n")
|
|
23 end
|