mirror of https://github.com/1Panel-dev/1Panel
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
321 B
16 lines
321 B
local logger = require "logger"
|
|
|
|
local loggers = {}
|
|
|
|
local _M = {}
|
|
|
|
function _M.get_logger(log_path, host, rolling)
|
|
local host_logger = loggers[host]
|
|
if not host_logger then
|
|
host_logger = logger:new(log_path, host, rolling)
|
|
loggers[host] = host_logger
|
|
end
|
|
return host_logger
|
|
end
|
|
|
|
return _M |