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

Feature: Standardize Logging Output for Hawk #208

Open
jonnybottles opened this issue Dec 20, 2024 · 0 comments
Open

Feature: Standardize Logging Output for Hawk #208

jonnybottles opened this issue Dec 20, 2024 · 0 comments
Assignees
Labels
status/ready Verified issue, ready to be assigned type/feature New feature or request

Comments

@jonnybottles
Copy link
Collaborator

What problem would this feature solve?

The current logging output for Hawk is inconsistent and lacks uniformity in tag usage. For example:

  1. Not all output uses the Out-LogFile prompt tags.
  2. Some logs contain redundant messages, such as repeated "Appending Data" entries for the same file.
  3. When writing logs, log write statements differ between "Appending" or "Writing" when writing data, when we should stick to just "writing" for uniformity.
  4. Logs for Start-HawkTenantInvestigation and Start-UserInvestigation lack proper categorization and usage of tags (e.g., [ACTION], [INFO], [INVESTIGATE]).

This inconsistency creates challenges for debugging, auditing, and maintaining a clean log history.

Proposed Solution

  1. Use Out-LogFile Tags:

    • Ensure all logging output consistently uses the Out-LogFile tags ([ACTION], [INFO], [INVESTIGATE], etc.).
  2. Standardize File Writing Logs:

    • Change all "Appending Data" logs to "Writing Data" when writing to a file.
  3. Clean Up Specific Outputs:

    • For Start-HawkTenantInvestigation, ensure all log entries are tagged and follow the standardized format.
    • Remove redundant messages and ensure proper categorization of actions (e.g., writing files, retrieving data).
    • Apply the same cleanup and tagging principles to Start-UserInvestigation.

Technical Requirements

  1. Update all logging operations to use the Out-LogFile function.
  2. Review and adjust the following components:
    • Start-HawkTenantInvestigation
    • Start-UserInvestigation

Implementation Approach

  1. Refactor existing log messages to call Out-LogFile with appropriate tags:
    • Use [ACTION] for steps being performed.
    • Use [INFO] for status updates or informational messages.
    • Use [INVESTIGATE] for any findings requiring review.
  2. Identify and remove redundant log entries during batch operations (e.g., repeated "Appending Data" for the same file).
  3. Audit all file-writing operations:
    • If the file is being created or overwritten, log as "Writing Data."
    • If appending, log as "Appending Data" only once per operation.

Acceptance Criteria

  1. All log entries for Start-HawkTenantInvestigation and Start-UserInvestigation use Out-LogFile with appropriate tags.
  2. Log messages for file-writing operations clearly differentiate between "Writing Data" and "Appending Data."
  3. No redundant log entries (e.g., multiple "Appending Data" for the same file).
  4. Output is uniform and adheres to the specified logging standards across all modules.
@jonnybottles jonnybottles added type/feature New feature or request status/ready Verified issue, ready to be assigned labels Dec 20, 2024
@jonnybottles jonnybottles self-assigned this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/ready Verified issue, ready to be assigned type/feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant