comparison src/error_log.js.luan @ 4:8896ffd7b152

start login
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 22 Oct 2023 23:53:59 -0600
parents
children 3e2cb946d511
comparison
equal deleted inserted replaced
3:43814e9f5802 4:8896ffd7b152
1 local Luan = require "luan:Luan.luan"
2 local error = Luan.error
3 local Http = require "luan:http/Http.luan"
4 local Logging = require "luan:logging/Logging.luan"
5 local logger = Logging.logger "error_log.js"
6
7
8 local function priority(err)
9 return "error"
10 end
11
12 return function()
13 local err = Http.request.parameters.err
14 if err == nil then
15 return -- stupid bots
16 end
17 local call = priority(err)
18 logger[call](trim(err).."\n"..trim(Http.request.raw_head).."\n")
19 end