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

server log file is not in the game folder #50

Open
LSL1337 opened this issue May 2, 2020 · 2 comments
Open

server log file is not in the game folder #50

LSL1337 opened this issue May 2, 2020 · 2 comments

Comments

@LSL1337
Copy link

LSL1337 commented May 2, 2020

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)

@bgauduch
Copy link
Owner

bgauduch commented May 2, 2020

@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 Update documentation and configuration about server fs_basepath & fs_homepath #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 ?

@LSL1337
Copy link
Author

LSL1337 commented Jan 3, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants