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

Lock file Optional when running logger #11

Closed
wants to merge 2 commits into from

Conversation

PotatoPeeler3000
Copy link
Collaborator

Added the option to make the lock file creation optional, it can be configured via the deploy gui, a checkbox has been added, by default it is true

Edge cases tested:

  • Running YoVariableLoggerDispatcher without any command line configuration
  • Running YoVariableLoggerDispatcher with the new command line argument
  • Deploying with the boolean as true and false, worked for both
  • When boolean is false was able to run multiple loggers, good!

System.exit(0);
}
if (lockFile.exists())
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be helpful to put "Lockfile found at (the path to the lockfile), This is likely from an existing logger running. Maybe if you weren't so full of yourself you would have checked if the logger was already running. If the logger is not running, it is safe to remove the file and restart the logger.

{
perms.add(PosixFilePermission.OWNER_READ);
Files.setPosixFilePermissions(lockFile.toPath(), perms);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoa whoa whoa, logger is starting without Lock File, be careful to make sure you only run one logger at a time. When redeploying as a service you should stop the service before deployment. Use ps aux | grep java to confirm.

@ds58
Copy link
Contributor

ds58 commented Aug 15, 2024

I'd prefer if we merge #12 instead. This removes the problem completely.

@PotatoPeeler3000 PotatoPeeler3000 deleted the feature/lock-file-optional branch August 28, 2024 15:06
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.

3 participants