lythx / trakman

Trackmania Forever server controller written in TypeScript
https://trakman.ptrk.eu
MIT License
24 stars 4 forks source link

Missed log messages and messed up their order on discord #244

Closed xadll closed 6 months ago

xadll commented 7 months ago

ENV

      LOG_LEVEL: 5
      DISCORD_LOG_ENABLED: "YES"
      DISCORD_LOG_LEVEL: 5

File log in comparison to Discord log

{number}

{--}

wsrvn commented 7 months ago

while this is far from ideal, i believe this cannot be truly fixed within our code. discord and cloudflare both have certain ratelimits for webhooks as mentioned here. if you want my 2 cents, it is also not a good practice to set the logging level to something other than info/warn, especially on webhook. the log order is likely messed up due to this as well (too many simultaneous requests on the api).

xadll commented 7 months ago

while this is far from ideal, i believe this cannot be truly fixed within our code. discord and cloudflare both have certain ratelimits for webhooks as mentioned here. if you want my 2 cents, it is also not a good practice to set the logging level to something other than info/warn, especially on webhook. the log order is likely messed up due to this as well (too many simultaneous requests on the api).

Good point. Will it be left as it is, or will a change be made to not allow a higher loglevel by design?

wsrvn commented 7 months ago

Good point. Will it be left as it is, or will a change be made to not allow a higher loglevel by design?

i will likely reference this issue in the wiki for clarity (like what we do for the database stuff). i reckon it would be counterproductive to limit the values. after all, it is your server. if you really wish to have your webhook spammed, so be it.