From
https://github.com/Starfox64/gLogs/blob/master/addons/gLogs/lua/glogs/hooks/README.txt:
-- ULX EXAMPLE --
-- To integrate ULX add the 'gLogs.AddLog' function to the ULX's log function like shown below (ULX/lua/ulx/log.lua)
function ulx.logString(str,log_to_main)
gLogs.AddLog("ulx",str,false) -- gLogs AddLog function added to ULX's. Notice that I don't use ULX's timestamp system to have standard timestamps in the logs.
if not ulx.log_file then return end
local dateStr = os.date("%Y-%m-%d")
if curDateStr < dateStr then
next_log()
end
if log_to_main then
ServerLog("[ULX] " .. str .. "\n")
end
local date = os.date("*t")
ulx.logWriteln(string.format("[%02i:%02i:%02i]",date.hour,date.min,date.sec) ..str)
end
-- You will also need to add the ulx (ULX) type in your control panel!
I posted this without actually checking the code, I haven't looked at the function itself but it needs a few ULX/ULib commands to fully work. Add these under the function:
local logString = ulx.command( CATEGORY_NAME, "ulx logstring", ulx.logstring, "!logstring" )
logstring:addParam{ type=ULib.cmds.StringArg, hint="string", Lib.cmds.takeRestOfLine }
logstring:defaultAccess( ULib.ACCESS_ADMIN )
logstring:help( "Logs string." )
Make sure to replace CATEGORY_NAME with the name of the category you want.