tl-its-umich-edu / tool-migration

App for migrating external (LTI) tools in Instructure's Canvas LMS.
1 stars 3 forks source link

logging: save to file; show config; update format #22

Closed lsloan closed 1 year ago

lsloan commented 1 year ago

Saving output

Update: Because the app will be run on a server (in an OpenShift container, triggered by Jenkins builds), saving the log output is no longer a concern.

~When working with Canvas subaccounts that contain many courses, the log output to the terminal may be too much for the scrollback buffer to capture. Add support for saving the log directly to a file.~

~Possible solutions…~

  1. ~Add | tee_output_filename_ following the docker compose up command~
    • ~Pro: No code change required~
    • ~Con: Makes the commandline longer and more prone to mistakes. It's also untested.~
  2. ~Change the logging code to write the logs to a file as well as stdout~
    • ~Pro: Keeps the commandline simple~
    • ~Con: Requires code change~

~Solution 2 seems to be the better choice, in terms of keeping the usage simple.~

Log configuration

If log files will be reviewed at a later time, it will be important to know what configuration parameters were set. Show the parameters, with additional information, if possible. I.e., names of sub-account, tools, etc.

Update format

The log output should include timestamps. When the log is going to the terminal, it may not seem necessary for the lines to include the time. However, if the app is run multiple times, having the timestamps will help determine which log lines go together, etc. Timestamps could also be used to correlate app results with other real-world conditions, such as network outages.

lsloan commented 1 year ago

@ziegler1960, if you have feedback on this issue, please tell me.

lsloan commented 1 year ago

With #32, this has been fully resolved.