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

Fix for issue #222 1.7.2 logging path #228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcoamorales
Copy link

Minecraft now logs to a different path, with the old path this would create a lot of tail processes.

@ghost
Copy link

ghost commented Nov 26, 2013

Unfortunately the fix would break pre-1.7.2 servers... It needs some logic in init/msm to detect the default log path, something along the lines of (pseudocode):

if [ -n "${DEFAULT_LOG_PATH}" ]; then
    # This method would require msm.conf no longer having a default entry for DEFAULT_LOG_PATH,
    # but allows user to specify one
    SERVER_LOG_PATH=${LOG_PATH}
elif [ -f [...]/logs/latest.log ]; then
    # Otherwise we detect and use >=1.7.2 log path
    SERVER_LOG_PATH=logs/latest.log
elif [ -f [...]/server.log ]; then
    # Or finally pre-1.7.2 log path
    SERVER_LOG_PATH=server.log
else
    # Throw error, user needs to specify their own DEFAULT_LOG_PATH value in msm.conf
fi

Of course it needs to be a bit more robust than this... For example, it doesn't really cater for different servers having different log paths!

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

Successfully merging this pull request may close these issues.

None yet

1 participant