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