-
Notifications
You must be signed in to change notification settings - Fork 9
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
Application Log Statements Output #29
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. 👍🏾
if #available(OSX 10.12, *) { | ||
os_log("*WARNING* os_log() statements not captured on OS X") | ||
} else { | ||
// Fallback on earlier versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to do something here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the else. It is for example only.
} | ||
|
||
tidy_zero_line_app_log_file(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is necessary.
The log should always contain something (e.g. start_slim()
would write something), no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logs now always generate some head and tail output. Files not deleted 👍
@@ -1,13 +1,32 @@ | |||
!1 OCSlimProject Example Test Page | |||
|
|||
Below is a simple Decision Table based Acceptance Test. It sends input to an instance of a Fixture which is implemented in your Xcode project. This is done by adding a class of the same name e.g. 'FixtureExample.swift' to your Acceptance Test target. | |||
Below is a simple Decision Table based Acceptance Test. It sends input to an instance of a Fixture which is implemented in your Xcode project. This is done by adding a class of the same name e.g. 'FixtureExample.swift' to your Acceptance Test target. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great introductory comment to re-inforce information that is hard to grok if you don't really understand how it all works.
…utputting something- Improve consistency/readability of ocsp logging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏾
Updated to no longer delete log files as logs are always created. Your thoughts on if a unique log file should be generated for each run (as it is now) or wether it should overwrite each run with a global log e.g. 'system_under_test.log' OR append to one big global log file each run. I'm questioning the value of a log file once you've moved onto the next one and the maintenance work being asked of the user. |
👍 for this PR. Regarding log files, I think you should just overwrite the same log each run (and possibly allow the user to specify a log name on the command line). Otherwise people will have to spend time deleting logs, or accidentally checking in a lot of rubbish to git. |
@paulstringer - I agree with @dcutting . You should overwrite to the same log filename (added to |
Thanks guys. I'll update the PR to use the suggested behaviour. Log will overwrite to |
Adds support for the following logging behaviour:
Supported Logging commands:
OS X
iOS
Logs are captured to Fitnesses's own execution log and written to file in the local project root in Logs/.log
Implementation Details:
The iOS implementation captures the logs from the simulator after the simulator app exists using the
simctl spawn booted log show
command.OSX simply redirects output from stderr/stdout when executing the app to a logfile.
Empty logs are deleted if zero lines are detected.Documentation and an example of logging has been added to the Fitnesse example.