qdm12 / cod4-docker

Runs a Call of duty 4 Modern Warfare (cod4x) dedicated server in a Docker container.
https://hub.docker.com/r/qmcgaw/cod4
MIT License
57 stars 10 forks source link

Logging doesnt work #5

Closed samatkiss closed 5 years ago

samatkiss commented 5 years ago

Hi!

Could you repair the cod4 logging?

Thanks Tamás

qdm12 commented 5 years ago

Hi there,

  1. Could you share how you create the log from your COD4 server configuration?
  2. Do you have any error messages in the docker logs
  3. Do you bind mount (with -v /path:/path or in volumes in docker-compose.yml) the log file?

Thanks

samatkiss commented 5 years ago
  1. With the command +set dedicated 2+set sv_cheats 0+set sv_punkbuster 0+set sv_maxclients 64+set ui_maxclients 64+set fs_game mods/pml220+exec server.cfg+map_rotate+set rcon_password xxxxxxx +set g_logsync 2+ set logfile 1+ set sv_punkbuster 1+ set g_log main/games_mp.log+ set sv_statusfile serverstatus.xml
  2. No
  3. The log file is in main so is bind mounted in a way
qdm12 commented 5 years ago

Indeed it does not work. I am trying to access cod4x.me website to understand why but it is offline now.

For now, it does not create any game_mp.log file by itself nor write to an existing one (in main or mods/pm1220. What you can do for now is simply store the logs from Docker although it's not perfect.

I will check again the next few days to see if the website comes back online.

samatkiss commented 5 years ago

Hi!

Thank you very much!

Good night

Tamas

Quentin McGaw notifications@github.com (időpont: 2019. ápr. 29., H, 22:52) ezt írta:

Indeed it does not work. I am trying to access cod4x.me website to understand why but it is offline now.

For now, it does not create any game_mp.log file by itself nor write to an existing one (in main or mods/pm1220. What you can do for now is simply store the logs from Docker although it's not perfect.

I will check again the next few days to see if the website comes back online.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/qdm12/cod4-docker/issues/5#issuecomment-487739555, or mute the thread https://github.com/notifications/unsubscribe-auth/AE6FHFYVSXCR674LQP7U6I3PS5NYLANCNFSM4HJEKWQQ .

qdm12 commented 5 years ago

Hi @samatkiss ,

I posted a question on Cod4x forums, I will let you know once I find out why it does not work.

Thanks !

samatkiss commented 5 years ago

Thank you!

Quentin McGaw notifications@github.com (időpont: 2019. máj. 8., Sze, 21:54) ezt írta:

Hi @samatkiss https://github.com/samatkiss ,

I posted a question on Cod4x forums https://cod4x.me/index.php?/forums/topic/3426-where-does-logs-go/, I will let you know once I find out why it does not work.

Thanks !

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/qdm12/cod4-docker/issues/5#issuecomment-490627157, or mute the thread https://github.com/notifications/unsubscribe-auth/AE6FHF7OFQPTGHJMFSKAAZ3PUMVWLANCNFSM4HJEKWQQ .

Koajakins commented 5 years ago

As I commented on the cod4x post, try the ~/.callofduty4/main folder (note the "." at the beginning) some of my logs appear there for my personal servers.

qdm12 commented 5 years ago

Hi @Koajakins thanks for the help ! Is there any way to setup the directory path instead of ~/.callofduty4 ?

@samatkiss ~I have added to the documentation how to do it.~ See last answer below!

  1. Create a directory

    mkdir logs
    chown 1000 logs
    chmod 700 logs
  2. Bind mount the volume with -v $(pwd)/logs:/home/user/.callofduty4 or, in docker-compose.yml:

    volumes:
        - ./logs:/home/user/.callofduty4
Koajakins commented 5 years ago

+set fs_homepath in the run script would most likely work fine. +set fs_homepath . would then place it into "main" I believe, though I haven't messed with it in a while.

Koajakins commented 5 years ago

https://github.com/qdm12/cod4-docker/blob/55ed1e5ae4cc15e2655383d5178f988a29254b07/Dockerfile#L45

qdm12 commented 5 years ago

Hi @Koajakins thanks for the tip !!

@samatkiss no need to do anything in the end, the logs will now be in mods/yourmod or in main if you run the server without mods. Happy gaming !