MantisBT - Doomseeker
View Issue Details
0003568Doomseeker[All Projects] Bugpublic2018-11-25 22:292019-07-30 10:13
Pol M 
0003568: Create Game dialog doesn't have a menu option to log/redirect output of started servers to a file
Zandronum server supports a "+logfile" option (?) to log output (stdout) to a file. It also supports the "CrashLogs" option for stderr.

Doomseeker has no graphical support in the Create Game dialog to select a path to log to, and/or a checkbox if the output of a started server should be logged to said file/path. It may be useful to have such option available from Create Game dialog for supported engines.
  1. (Have at least one game engine plugin installed to Doomseeker.)
  2. Start Doomseeker.
  3. Navigate to File → Create Game (Ctrl+S).
  4. In the "General" tab, notice there's no graphical option for logging.
Issue hinted by 0003567.

Meanwhile, we have support for "Custom parameters" (does it work with +logfile?) and "Host command line" (for stdout redirection, on Windows too).
No tags attached.
png 2019-02-17-214442_1920x1080_scrot.png (784,970) 2019-02-17 20:47
Issue History
2018-11-25 22:29WubTheCaptainNew Issue
2018-11-25 22:32WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=12288#r12288
2018-11-25 22:41WubTheCaptainNote Added: 0020203
2018-11-25 22:41WubTheCaptainStatusnew => acknowledged
2019-01-17 22:14Pol MNote Added: 0020314
2019-01-17 22:14Pol MAssigned To => Pol M
2019-01-17 22:14Pol MStatusacknowledged => assigned
2019-01-24 21:40Pol MNote Added: 0020319
2019-01-24 21:40Pol MStatusassigned => needs review
2019-01-24 21:41Pol MNote Edited: 0020319bug_revision_view_page.php?bugnote_id=20319#r12364
2019-01-24 21:42Pol MNote Edited: 0020319bug_revision_view_page.php?bugnote_id=20319#r12365
2019-01-27 11:35ZalewaStatusneeds review => needs testing
2019-01-27 11:36ZalewaNote Added: 0020322
2019-02-11 15:56WubTheCaptainPrioritynone => normal
2019-02-11 15:59WubTheCaptainNote Added: 0020373
2019-02-11 15:59WubTheCaptainStatusneeds testing => assigned
2019-02-11 16:29Pol MNote Added: 0020375
2019-02-11 16:50Pol MStatusassigned => needs review
2019-02-11 16:51Pol MStatusneeds review => needs testing
2019-02-17 03:11WubTheCaptainTarget Version => 1.3
2019-02-17 06:56FilysteaNote Added: 0020399
2019-02-17 11:31Pol MNote Added: 0020400
2019-02-17 12:21ZalewaNote Added: 0020401
2019-02-17 20:47FilysteaNote Added: 0020405
2019-02-17 20:47FilysteaFile Added: 2019-02-17-214442_1920x1080_scrot.png
2019-02-17 21:05Pol MNote Added: 0020407
2019-02-17 21:09FilysteaNote Added: 0020409
2019-02-17 22:56ZalewaNote Added: 0020410
2019-02-18 16:59FilysteaNote Added: 0020411
2019-02-18 19:35FilysteaNote Added: 0020412
2019-02-18 20:10Pol MNote Added: 0020413
2019-02-18 21:16ZalewaNote Added: 0020415
2019-02-18 21:24ZalewaNote Edited: 0020415bug_revision_view_page.php?bugnote_id=20415#r12436
2019-02-18 22:06FilysteaNote Added: 0020416
2019-06-23 10:12ZalewaNote Added: 0020820
2019-06-23 10:12ZalewaStatusneeds testing => resolved
2019-06-23 10:12ZalewaFixed in Version => 1.3
2019-06-23 10:12ZalewaResolutionopen => fixed
2019-07-30 10:13WubTheCaptainStatusresolved => closed

2018-11-25 22:41   
Acknowledged by Blzut3 at 0003567:0020195.
Pol M   
2019-01-17 22:14   
I'm gonna take a look at it
Pol M   
2019-01-24 21:40   
(edited on: 2019-01-24 21:42)

2019-01-27 11:36   
pr merged
2019-02-11 15:59   
A small typo in your commit:

Quote from src/plugins/zandronum/zandronumgamehost.cpp
// Zandronum sufixes a date plus a ".log" extension. We'll add a prefix.

suffixes? (English)

sufixes is Portuguese.
Pol M   
2019-02-11 16:29   
I'll take care of it :)
2019-02-17 06:56   
Hello since it needs testing. Provide windows 1.3 binary. Since issue is kind of windows problem ( on unix it's piece of cake to have it done, but windows... | )

And again sorry if it would be unix problem I would compile without wasting your time here. But I won't compile on Windows. Really, windows is hassle allways. Not gona lose time on compiling on that fucked up system. Especialy I rarely need to compile anything on it so I am kind of nhob and not going to change it.

Other solution - someone who wants to lose time on win compilation - go for it.
On doomseeker website we have only 1.2
Pol M   
2019-02-17 11:31   
I'd be glad to provide a windows binary but I don't even have it installed on any computer, so unfortunately it won't be possible right now from my part.
We're working on porting the compiling process to mingw, so there is a small chance that I'll be able to cross-compile it from my linux machines, which would be a small nice feature.

That said, this ticket also affects all the other platforms and the code should be OS-abnostic, so feel free to compile it in your prefered distro :)
2019-02-17 12:21   
Windows build is already available on the Beta auto update channel. You can download it through Doomseeker. In the Configuration box go to the "Auto Updates" section and select "Beta" from the "Update channel" combo box, save the configuration and close the config box. Then from the "Help" menu, select "Check for Updates". The program will guide you through the next steps.
2019-02-17 20:47   
Compiled on openbsd.

Not only had to insert random shit to HG_REVISION_HASH_STRING and similar two other crap macros you did not set to make compiler fuck off. But also I dont see that option for data redirect in general.

I just downloaded doomseeker src from default.

Provided screenshot.
Pol M   
2019-02-17 21:05   
It only works in Zandronum and Odamex, since those are the ones that allow you to set a directory for logs. Surely there is a way to also log the output the program generates, but this is not what this ticket was intended to cover.
2019-02-17 21:09   
pipe dup fork exec - all output is yours on any unix. That is why i askd for windows support. Is there no way to take over in windows?
2019-02-17 22:56   
Is there something specific that you're not happy with in the current implementation?
2019-02-18 16:59   
Probably everything.

I don't see where the option is. This is one. I passed screenshot and I see nothing here.

I got answer the logging works only for odamex and zandronum. Because they provide option for it. Very very bad way of solving problem!

This is not perfect logging if you are using the external in game logging option. How can you be sure EVERYTHING will be loged this way. We dunno. Instead we should capture stdin stderr and log it without using inside-port options. We should not be bothered with them anyway.

Ill check the *logging* works on windows later if indeed the oprion will be there. Let's say it's still good you made it. Even if the way it was done is clearly wrong.
2019-02-18 19:35   
So I tested it on zandronum. I mean i compiled without sound ( what a great game play ) zandronum. I started the server on my openbsd 6.4 and it DID FUCKING LOG. The log option works. I picked the directory.

HUGE PROBLEM - you can't set log file name. Wtf people. WTF!!!!!

Will check later on wincrap.

Carry on.
Pol M   
2019-02-18 20:10   
Quote from Filystea

and it DID FUCKING LOG. The log option works. I picked the directory.

Glad to hear this :)
Quote from Filystea

HUGE PROBLEM - you can't set log file name. Wtf people. WTF!!!!!

This is due to one of the engines (I believe it was Zandronum) always appending a filename to any given path, which prevented me from doing this. Odamex did not do that, but I decided to opt for something simple and not add more optional camps that at the end only one engine would use (plus being confusing to the end user).

Just to clarify: if you run: zandronum-server -iwad [PATH_TO_IWAD] +logfile [PATH_TO_LOG_FOLDER]/theLogFile.log

It won't log into the "theLogFile.log" file, even if it is previously created.

Quote from Filystea

This is not perfect logging if you are using the external in game logging option. How can you be sure EVERYTHING will be loged this way. We dunno. Instead we should capture stdin stderr and log it without using inside-port options. We should not be bothered with them anyway.

I prioritize what the developers want to specifically log. So, if an engine has a way to log info into a file, I'll pick that one over stdout/err. That said, I can look into whether or not it is possible to get those for the other engines. For the moment, I'd prefer to focus more on the objective of this ticket for the moment, and after that, you can open a ticket related to this, which I'll happily investigate.
2019-02-18 21:16   
(edited on: 2019-02-18 21:24)
The results of capturing stdout/stderr vary depending on the game and the platform on which it is run. Game's behavior that you see on Linux can be different on Windows. This is up to the implementation of the game itself and there's nothing we can do about it aside from hacking the game's memory and injecting our own code, or kindly asking all the devs to "fix" their games.

- Zandronum server is a GUI program and doesn't open a console, however I managed to capture something from stderr:

Error Opening file N:/gry/doom/porty/Zandronum/GeoIP.dat

stdout was empty.

- Odamex seems to be capturable. This could be teed to the StandardServerConsole class and a file, provided that there's something valuable there that isn't already logged by the `+logfile` option.

- Chocolate Doom stdout/stderr is taken over by the SDL's default behavior where it creates stdout.txt and stderr.txt files in the game directory and logs everything there. We could read those files from the disk and tee them to StandardServerConsole and the logfile in Doomseeker but that's just a nasty hack that only works as long as there's just one server.

- SRB2 enforces opening its own console window and outputs everything there, completely ignoring the stdout/stderr redirection.

- I don't have Turok2EX so I can't check.

2019-02-18 22:06   
After few beers and longer meditation it's fine how it is.

I already capture whole stdout and stderr on my server ( wrote stdin earlier but meant stdout ). And windows is just for debugging when running mod after chnages i made in my pk3 files. So for testing logfile is enough.

ill test windows maybe tomorrow and we can set it as resolved.
2019-06-23 10:12   
I tested this on Windows and it works as it should. Resolving.