Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend db_log event logging #181

Open
Hamburgergamer opened this issue Mar 15, 2021 · 3 comments
Open

Extend db_log event logging #181

Hamburgergamer opened this issue Mar 15, 2021 · 3 comments
Labels
plugin feature request Feature request related to the SquadJS plugins

Comments

@Hamburgergamer
Copy link

What is the issue, e.g. map voting, you would like to solve?

The db_log plugin is currently not logging every available events from log-parser. When I create database request for player statistics, I often miss data to order players based on playtime or selected role. It would be great, if the db-log plugin would also log player-connected, player-disconnected, player-possess and player-un-possess events. Some server owners might not want to spam their databases with this data, so it should be configurable within the setting.

How would you like us to solve this issue?

As a quick fix, these events could be logged as raw data in a separate table for each event. My preferred solution would be combining player-connected and player-disconnected in a "session" table like:

|| sessionID || steamID || connected || disconnected || playtime ||

The "playtime" value would be calculated time between the connect and the disconnect. This would allow dscord bots like SquadStats to also display the time a player played on the server.

For player-possess and player-un-possess it would be already great to just log all the data somewhere to check for which use-cases this values could be useful.

Additional Info

It would be awesome, if the existing tables DBLog_deaths, DBLog_Wounds, DBLog_Revives could include the MatchID. This makes it easier to identify when a specific event happened.

@Hamburgergamer Hamburgergamer added the plugin feature request Feature request related to the SquadJS plugins label Mar 15, 2021
@milutinke
Copy link
Contributor

milutinke commented Mar 18, 2021

I have already done a similar thing with the plugin 7 days ago, but I wanted to test it properly.
That is why I've added the PLAYER_DISCONNECTED event in my last commit.

Here is what it looks like:
image
image

Here is the info that I am logging:
image

I will commit it soon.
Edit: PS: Do not mind the NULL values, those are just because I've started the bot during the match, so I had no previous recorded data of players from PLAYER_CONNECTED event.

@Hamburgergamer
Copy link
Author

Hamburgergamer commented Mar 22, 2021

@milutinke that looks really awesome and is exactly what I am looking for.
It will make the insights from the database a lot easier to compare.
I hope that it will find its way to the master branch quickly.

@milutinke
Copy link
Contributor

@milutinke that looks really awesome and is exactly what I am looking for.
It will make the insights from the database a lot easier to compare.
I hope that it will find its way to the master branch quickly.

Well, Thomas seems to be busy, so you might wait a little longer.
In the meantime, you can try out my fork and modify it for your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin feature request Feature request related to the SquadJS plugins
Projects
None yet
Development

No branches or pull requests

2 participants