-
Notifications
You must be signed in to change notification settings - Fork 9
Application Log Statements Output #29
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
Open
paulstringer
wants to merge
18
commits into
master
Choose a base branch
from
App-Logging-To-File
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
aac68d2
Add logging to example app.Export log form iOS systems to easily disc…
paulstringer fc96c14
Add notes for platform differences related to Logging
paulstringer c688ee2
Add examples to OS X and iOS Fixtures with exanples matching differen…
paulstringer 5fbc887
Refactor logging in Mac scripts
paulstringer 204d2e7
Fix examples of stderror logs that trigger a fail of the build
paulstringer cc49160
Wrap os_log call in conditional to fix compile error
paulstringer cdabb34
Improve log messages OS X
paulstringer c32686b
Refactor logging message from test runner script
paulstringer 6ae0668
Add write to log file for OS X platform for consistency with iOS
paulstringer 4996609
Updates Logging platform docs in Fitnesse pages
paulstringer 6e0e49b
xcpretty output on travis ci
paulstringer 1812480
Fix travis config typo.Use travis xcpretty formatter
paulstringer bafa0cb
Wrap os.log on ios with ifavailable to fix build error on ci
paulstringer 6ced29b
OSX NSLog statements are now supportedTidy documentation on logging
paulstringer ab40a61
- Do not delete logs if empty.- Ensure logs are not empty by always o…
paulstringer 421a587
Add shell script to group logging to file utilities
paulstringer a3db1fc
Adds Bash Assert Repo\n Create new-log-file command
paulstringer 8c686ea
Generated logfile name not uniqued
paulstringer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 25 additions & 6 deletions
31
Pod/Support/SharedSupport/FitNesseRoot/OCSlimProjectExamplePage/TestPage/content.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
|
||
| The first column 'input' will set a property of the same name. The expected 'output?' denoted by columns with '?' at the end of the property name are returned by your Fixture and verified against the expected value in that column. | ||
|
|
||
| Click 'Test' to run this page and see this in action. After that check out ''!-FixtureExample.swift-!'' in your Xcode project to see the 'FixtureExample.swift' implementation. | ||
|
|
||
| |Fixture Example| | ||
| |input |output? | | ||
| |foo |bar | | ||
| |bar |baz | | ||
| !2 Simple Decision Table Example | ||
| | Fixture Example | | ||
| | input | output? | | ||
| | foo | bar | | ||
| | bar | baz | | ||
|
|
||
| !2 Logging Example | ||
| | script | Fixture Example | | ||
| | ensure | log | | ||
|
|
||
| !3 Logging | ||
|
|
||
| * Find log files for each test run in the current directory ./Logs/<DATE>.log. | ||
| * Log statements are reported in the 'Execution Log' (see the button after running a test located in the top right navigation). | ||
| * Test runs that generate no log statements will not generate a log file. | ||
|
|
||
| !4 iOS: | ||
| * NSLog() | ||
| * os_log() | ||
| * print() does not work! | ||
|
|
||
| !4 macOS X: | ||
| * NSLog() | ||
| * print() | ||
| * os_log() does not work! | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/bin/sh | ||
| source '../../../assert.sh/assert.sh' | ||
|
|
||
| LOGPATH=$(./ocsp-logger.sh new-log-file) | ||
| LOGBASENAME=$(basename $LOGPATH) | ||
| LOGDIR=$(dirname $LOGPATH) | ||
|
|
||
| assert_not_empty "$LOGPATH" | ||
| [ "$?" == 1 ] && log_failure "new-log-file should not be empty" | ||
|
|
||
| test -d "$LOGDIR" | ||
| assert_eq 0 $? | ||
| [ "$?" == 1 ] && log_failure "new-log-file '$LOGDIR' is not a valid directory" | ||
|
|
||
| expected="slim_system.log" | ||
| assert_eq "$LOGBASENAME" "$expected" | ||
| [ "$?" == 1 ] && log_failure "new-log-file '$LOGBASENAME' is not the expected '$expected' filename" | ||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/sh | ||
|
|
||
| ACTION=LOG_PATH | ||
|
|
||
| function main() { | ||
|
|
||
| if [ "$ACTION" == "LOG_PATH" ]; then | ||
| local LOGDIR="Logs" | ||
| local LOGPATH="$(pwd)/$LOGDIR" | ||
| local LOGFILENAME="slim_system.log" | ||
| local LOGFILE="$LOGPATH/$LOGFILENAME" | ||
| mkdir -p $LOGPATH | ||
| echo "$LOGFILE" | ||
| fi | ||
|
|
||
| } | ||
|
|
||
| main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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 👍