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

DBG_LOG_FILE_NAME should be a preference #105

Open
sscargal opened this issue Jun 26, 2019 · 2 comments
Open

DBG_LOG_FILE_NAME should be a preference #105

sscargal opened this issue Jun 26, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@sscargal
Copy link
Contributor

When we set a non-zero DBG_LOG_LEVEL, there is no user feedback to show where the debug.log file is being written. The default location is `/var/log/ipmctl/debug.log' in Linux.

We should:

  1. Allow the user to get/set the log file location using ipmctl show -preferences and ipmctl set -preferences DBG_LOG_LEVEL=/path/to/my/debug.log
  2. Provide a message to the user of the log file location when setting DBG_LOG_LEVEL
  3. Document the default log file locations for Linux and Windows in the ipmctl-show-preferences(1) man page within a new DBG_LOG_FILE_NAME section.

For 1, the output would look like this:

# ipmctl show -preferences

CLI_DEFAULT_DIMM_ID=HANDLE
CLI_DEFAULT_SIZE=GiB
APPDIRECT_SETTINGS=RECOMMENDED
APPDIRECT_GRANULARITY=RECOMMENDED
PERFORMANCE_MONITOR_ENABLED=0
PERFORMANCE_MONITOR_INTERVAL_MINUTES=60
EVENT_MONITOR_ENABLED=0
EVENT_MONITOR_INTERVAL_MINUTES=60
EVENT_LOG_MAX=0
DBG_LOG_MAX=0
DBG_LOG_LEVEL=0 
DBG_LOG_FILE_NAME=/var/log/ipmctl/debug.log   <<<<<

For 2, the output to the terminal would look like this:

# ipmctl set -preferences DBG_LOG_LEVEL=4
Set DBG_LOG_LEVEL=4: Success
DBG_LOG_FILE_NAME=/var/log/ipmctl/debug.log

For 3, we could add this to the man page

--- 8< ---
DBG_LOG_LEVEL
    Whether debug logging is enabled in the DCPMM host software. These logs pertain to the operation of the command-line tool only and do not reflect any logging functionality of the DCPMM. One of:

    0: Logging is disabled. This is the default.
    1: Log Errors.
    2: Log Warnings, Errors.
    3: Log Informational, Warnings, Errors.
    4: Log Verbose, Informational, Warnings, Errors.

DBG_LOG_FILE_NAME
    Defines the path to the debug.log file.  The path and filename can be modified using the 'set -preferences' command.  Default locations are:

    Linux: /var/log/ipmctl/debug.log
    Windows: ???

@sscargal
Copy link
Contributor Author

We could/should do the same with EVENT_LOG_FILE_NAME

@gldiviney gldiviney added the enhancement New feature or request label Jun 27, 2019
@gldiviney
Copy link
Contributor

Thanks - Will review

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

No branches or pull requests

2 participants