-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add a way to prevent server-side prints from being redirected to players #3029
Comments
You can already do this
This overwrites the forward the server does here EDIT: Looking at the code this should stop the print from getting forwarded to the client, you should double check that it actually works |
Yea looks like this logic isn't actually uses except to not print to the server, the scope destructor will still print to the client no matter what. Wonder if people would be against all of this being the default and having to opt in to this forwarding & sending to the client as I don't think most people have liked this being the default anyways. |
I don't know if that adds something to this issue but even just a simple server side print is shown client side I'm using version (v7.3.2 / 12168) in my server |
same thing happens on event onResourceStart onResouceStop not just RegisterCommand , and Its been like this for a very long time, I remember making me confused. |
Not usually a problem but if you calling another resource via an export, in this case a syslog resource and it uses console printing for debugging, it then sends the output to client console instead of server console. Would be great if there was a way to stop this redirection per resource. Also using |
What happened?
Hello,
this isn't technically a bug report, but I was told to post this here anyway by Heron.
I used to use Lua's
io.write(message)
to be able to guarantee certain server console output will never get redirected to a client, e.g. when executing a command.io.write
would just print directly to stdout without triggering the redirect. This no longer works as of build 12092 (not exact number) as io.write doesn't exist anymore. It worked in 11516.Since
io.write
doesn't exist anymore, and JavaScript's similarprocess.stdout.write
is also apparently planned to be removed, I'd like to suggest a way to prevent these redirects from happening.Thanks
Expected result
Prints to stdout
Reproduction steps
Once a player executes the /test command from the code below, the output will be seen in the client's F8 console (and potentially stock chat). It's transmitted via a
__cfx:internal:serverPrint
S->C event. I think it would be good to have a way to print to the server's console in such cases without the player being able to read what it says.Importancy
Unknown
Area(s)
FiveM, FXServer, ScRT: Lua
Specific version(s)
FXServer 12092
Additional information
No response
The text was updated successfully, but these errors were encountered: