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

Add Support for --logdir and Move Configuration Files to ProgramData for Process Governor #32

Open
mipsou opened this issue Dec 14, 2024 · 0 comments
Labels
enhancement New feature or request P:Low Low priority

Comments

@mipsou
Copy link

mipsou commented Dec 14, 2024

Summary

Summary
Add support for a --logdir option in Process Governor to allow users to specify a custom directory for logs. This would improve file organization by separating logs from the executable and configuration files, adhering to best practices for modern application management.

Basic example

A user could specify a custom directory for logs by providing the --logdir argument in the Process Governor command-line:

cmd
Code
"C:\Program Files\ProcessGovernor\Process Governor.exe" --config "C:\ProgramData\ProcessGovernor\config.json" --logdir "C:\ProgramData\ProcessGovernor\logs"
Example Configuration:
A typical setup would include:

Configuration file stored at:
text
Code
C:\ProgramData\ProcessGovernor\config.json
Logs redirected to:
text
Copier le code
C:\ProgramData\ProcessGovernor\logs
Example batch script for automation:

cmd
Code
@echo off
if not exist "C:\ProgramData\ProcessGovernor\logs" mkdir "C:\ProgramData\ProcessGovernor\logs"
"C:\Program Files\ProcessGovernor\Process Governor.exe" --config "C:\ProgramData\ProcessGovernor\config.json" --logdir "C:\ProgramData\ProcessGovernor\logs"
This ensures:

Logs are stored in a dedicated directory.
The configuration is loaded properly.
Folder creation is automated.

Motivation

Why are we doing this?
Currently, logs generated by Process Governor are written in the same directory as the executable. This approach:

Clutters the application directory.
Does not comply with modern conventions where logs should be separated for easier management.
Use cases:
System administrators: Centralize logs in C:\ProgramData for better organization and ease of backup.
Multi-user systems: Ensures logs are stored in a shared, accessible location.
Automation: Makes it easier to automate folder creation and log rotation.
Expected outcome:
Cleaner separation of application files and logs.
Improved portability and maintainability for users.
Align Process Governor with industry-standard application management practices.

@mipsou mipsou added the enhancement New feature or request label Dec 14, 2024
@SystemXFiles SystemXFiles added the P:Low Low priority label Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P:Low Low priority
Projects
None yet
Development

No branches or pull requests

2 participants