njones / socketio

A Modern SocketIO library for go
MIT License
60 stars 9 forks source link

[Proposal] Add ability to forgo the card prefix for ID #69

Closed ethanholz closed 1 year ago

ethanholz commented 1 year ago

The card prefixing used when printing a socket ID can be quite distracting in logging. I propose that the prefix value (or possibly a function) could be passed to the NewServer function on instantiation.

njones commented 1 year ago

I'm thinking about this. I understand the reasoning behind the request. It's just that I want to make sure that the prefix contains something that can't be mistaken as a user created room, causing a security concern. I should have something out this weekend on the proposal.

Would removing them from String output be enough to satisfy your logging annoyance?

Also, in looking at the code, I see there's a bug in assigning a constant seed for the random generator, that needs to get fixed, so at a minimum I will do that. Thanks for bringing this up (I didn't think anyone would really see the cards).

ethanholz commented 1 year ago

I think that would suffice, I just want the option to include it or not.