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/logging user action #23

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Fix/logging user action #23

wants to merge 8 commits into from

Conversation

katedmc
Copy link
Collaborator

@katedmc katedmc commented Dec 30, 2018

Description

What:
I extended the existing logging code to include all authoring app actions. The logging file appends user actions and has a max file size.

Why:
A previous issue asked for detailed logging. We now have more detailed information about what actions the users take.

How:
Utilized a different constructor for the FileHandler to add appending to the file, and changed the file limit from default to 1MB
Leveraged the logger from the GUI in InsertBefore and RightPanel classes to add logging.

Time:
Less than 15 minutes to read and review the code and PR.
Approximately 15 minutes to test code changes.

Added

  • Added a constant value for the max log file size in GUI class.
  • Added boolean value "true" to FileHandler constructor for appending
  • Added logger lines into InsertBefore and RightPanel Class

Changed

  • Changed to different FileHandler constructor to use file appending
  • Changed max file value from default max to 1MB with constant value

How should this be manually tested?

Checking Max File Size:

  1. Change 'fileSizeLimit" to 200
  2. Run Authoring app
  3. Select "New Scenario"
  4. Select "New Item"
  5. Check log for added items
  6. Select "New Item" x2
  7. Check if log file has been reset.
  8. Change "fileSizeLimit back to "1024000"

Checking All user actions are logged:

  1. Run authoring app
  2. Select "New Scenario"
  3. Select all available user options from "New Item" to "Test Scenario"
  4. Check if log file contains selected user actions

Extended the logging to catch all user actions. Log file is now appended
to.
Added in size limit for logger now that user actions are appended to
file.
src/authoring/GUI.java Outdated Show resolved Hide resolved
katedmc and others added 6 commits February 11, 2019 14:35
This class will be used consolidate logging code across TBB.
The GUI logger is now the TBBLogger, and all classes that use the GUI
logger are included in the new logging design.
Abstract Player class, and subsequent child classes, now all use
TBBLogger to help consolidate code usage.
The logger has been changed to use the TBB logger to clean up the code
more. The ScenarioParser also uses the static error logger from
TBBLogger to further clean up code.
TBBLogger added to SCALP and logging added to capture Scenario
Selection.
@katedmc
Copy link
Collaborator Author

katedmc commented Feb 11, 2019

As of now, on top of the original changes, this branch:

  • has the new TBBLogger class for better code reuse;
  • all old instances of Logger have been replaced by TBBLogger
  • All repeated uses of the FileHandler format have been removed.
  • SCALP logging has been to this branch (A 2 line change in SCALP)

The overall functionality hasn't been changed as the main changes were to the logger instances.

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

Successfully merging this pull request may close these issues.

2 participants