Skip to content

Commit

Permalink
feat(logging): ox logging vararg support
Browse files Browse the repository at this point in the history
* support for grafana and datadog tagging

* change to not use discord tags field and use new field

---------

Co-authored-by: John Zeigler <103866867+zeiglermensch@users.noreply.github.com>
  • Loading branch information
real-general-iroh and real-general-iroh committed Apr 2, 2024
1 parent 6ee7fc9 commit 9d0f1f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ end
---@field webhook? string Discord logs only. url of the webhook this log should send to
---@field color? string Discord logs only. what color the message should be
---@field tags? string[] Discord logs only. tags in discord. Example: {'<@%roleid>', '@everyone'}
---@field oxLibTags? string[] -- Tags for ox_lib logger

---Logs using ox_lib if ox_lib logging is configured. Additionally logs to discord if a web hook is passed.
---@param log Log
Expand All @@ -146,7 +147,7 @@ local function createLog(log)
---@diagnostic disable-next-line: param-type-mismatch
discordLog(log)
end
lib.logger(log.source, log.event, log.message) -- oxlib fails silently if logging isn't setup correctly.
lib.logger(log.source, log.event, log.message, log.oxLibTags) -- support for ox_lib datadog and grafana loki logging
end

return {
Expand Down

0 comments on commit 9d0f1f8

Please sign in to comment.