call-of-duty-2-docker-server icon indicating copy to clipboard operation
call-of-duty-2-docker-server copied to clipboard

server log file is not in the game folder

Open LSL1337 opened this issue 4 years ago • 2 comments

server log file is not in the game folder. maybe the mounts are misconfigured?

Server "main" folder volume

VOLUME [ "/home/${SERVER_USER}/main" ]

redirect server multiplayer logs to container stdout

RUN mkdir -p /home/${SERVER_USER}/ .callofduty2 / main/
&& ln -sf /dev/stdout /home/${SERVER_USER}/ .callofduty2 / main/games_mp.log

I'm not sure, maybe the bold part can be removed? and anyway, I don't think this is preferable to hardcode a log file, when the mods/configs can be executed from multiple directories (eg. pam, zombie, etc)

LSL1337 avatar May 02 '20 10:05 LSL1337

@LSL1337 Well you are pointing out something that needs to be clarified and fixed.

As discussed with you in #37 and especially in this comment, the way server logs are handled need to be fixed.

There a many things to consider here:

  • The way fs_homepath and fs_basepath works by default and how it should be setup (see #33);
  • The fact that server logs and game logs are sadly separated (see the doc);
  • The fact that I'm trying to follow the 11th principle of a twelve-factor app about logging: all logs should be routed to the stdout of the container to then be handled externally (it's not the container responsibility to know how the log will be consumed, but they certainly should be aggregated to stdout);
  • The little hack you refer to, used to route game logs to container stdout. I do totally agree with you on this point, it shouldn't be hardcoded.

Putting it all together, I'm not sure how to properly handle logs ! Any advices on that matter ?

bgauduch avatar May 02 '20 11:05 bgauduch

Hi,

I run my docker cod2 server from the zpam mod folder (post arguments : +set fs_game zpam) In that case, if I mount the following folder to my host machine to whereever, I have access to the 2 server config files: /home/cod2/.callofduty2/zpam

  • games_mp.log
  • console_mp_server.log

this folder, or even the main folder is not mounted by default, so it can not be reached by the default volume mappings (I think)

LSL1337 avatar Jan 03 '21 20:01 LSL1337