Skip to content

Commit

Permalink
update generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Maloney committed Oct 18, 2016
1 parent cc6f5a2 commit 981aba2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 56 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ after_failure:
- test -f "CleanroomLogger-tvOS-test.log" && tail -n 2500 "CleanroomLogger-tvOS-test.log"
- test -f "CleanroomLogger-tvOS-test.log" && LINE_BEFORE=`cat "CleanroomLogger-tvOS-test.log" | grep -n "IDETestOperationsObserverDebug. Writing diagnostic log for test session to." | awk -F':' '{print $1}'` && LINE=`expr $LINE_BEFORE + 1` && LOG_FILE=`head -n $LINE "CleanroomLogger-tvOS-test.log" | tail -n 1` && cat "$LOG_FILE"
- test -f "CleanroomLogger-watchOS-build.log" && tail -n 2500 "CleanroomLogger-watchOS-build.log"

26 changes: 0 additions & 26 deletions BuildControl/repos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,15 @@

<Var name="branches" type="list">
<Var literal="master"/>
<Var literal="swift3"/>
</Var>

<Var name="versions" type="map">
<!-- master branch declarations -->
<Var name="master" type="map">
<Var name="Swift" literal="2.3"/>
<Var name="Xcode" literal="8"/>

<Var name="Carthage" literal="0.17.2"/>

<Var name="current" type="map">
<Var name="iOS" literal="10.0"/>
<Var name="macOS" literal="10.12"/>
<Var name="tvOS" literal="10.0"/>
<Var name="watchOS" literal="3.0"/>
</Var>

<Var name="minimum" type="map">
<Var name="iOS" literal="8.0"/>
<Var name="macOS" literal="10.10"/>
<Var name="tvOS" literal="9.0"/>
<Var name="watchOS" literal="2.0"/>
</Var>
</Var>

<!-- swift3 branch declarations -->
<Var name="swift3" type="map">
<Var name="note" literal="This branch is still under active development. Expect breaking changes to the API, the build system and/or the project structure at any time. **Be sure to lock against a specific commit if you simultaneously require Swift 3 and stability.**"/>

<Var name="Swift" literal="3.0"/>
<Var name="Xcode" literal="8"/>

<Var name="Carthage" literal="0.17.2"/>
<Var name="git" literal="2.7.4 (Apple Git-73)"/>

<Var name="current" type="map">
<Var name="iOS" literal="10.0"/>
Expand Down
16 changes: 8 additions & 8 deletions INTEGRATION.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Gilt Tech logo](https://raw.githubusercontent.com/gilt/Cleanroom/swift3/Assets/gilt-tech-logo.png)
![Gilt Tech logo](https://raw.githubusercontent.com/gilt/Cleanroom/master/Assets/gilt-tech-logo.png)

# CleanroomLogger Integration Notes

Expand All @@ -13,7 +13,7 @@ Macintosh|macOS 10.12|macOS 10.10
Apple TV|tvOS 10.0|tvOS 9.0
Apple Watch|watchOS 3.0|watchOS 2.0

**This is the `swift3` branch of CleanroomLogger.** It uses **Swift 3.0** and **requires Xcode 8** to compile.
CleanroomLogger uses **Swift 3.0** and **requires Xcode 8** to compile.

### Options for integration

Expand All @@ -36,12 +36,12 @@ Within to your project’s root directory, Carthage-based projects will store a
To integrate CleanroomLogger in your workspace, you would start by adding the following line to the `Cartfile`:

```
github "emaloney/CleanroomLogger" ~> 0.0.0
github "emaloney/CleanroomLogger" ~> 3.0.0
```

This specifies that Carthage use the latest version of CleanroomLogger that is API-compatible with 0.0, i.e. any 0.0.*x* version.
This specifies that Carthage use the latest version of CleanroomLogger that is API-compatible with 3.0, i.e. any 3.0.*x* version.

**Note:** Be sure to check the [latest releases](https://github.com/emaloney/CleanroomLogger/releases); there may be a newer version than 0.0 that is no longer API-compatible.
**Note:** Be sure to check the [latest releases](https://github.com/emaloney/CleanroomLogger/releases); there may be a newer version than 3.0 that is no longer API-compatible.

### 2. Download CleanroomLogger using Carthage

Expand Down Expand Up @@ -113,7 +113,7 @@ Select the appropriate Build Scheme for your Target, and press `⌘-B` to try to

### You're done!

Once properly integrated, you can make use of [the API](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/index.html) provided by CleanroomLogger using the statement:
Once properly integrated, you can make use of [the API](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/index.html) provided by CleanroomLogger using the statement:

```swift
import CleanroomLogger
Expand Down Expand Up @@ -176,14 +176,14 @@ Select the appropriate Build Scheme for your Target, and press `⌘-B` to try to

### You're done!

Once properly integrated, you can make use of [the API](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/index.html) provided by CleanroomLogger using the statement:
Once properly integrated, you can make use of [the API](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/index.html) provided by CleanroomLogger using the statement:

```swift
import CleanroomLogger
```

## Further Reading

Want to learn more about CleanroomLogger? Check out [the README](https://github.com/emaloney/CleanroomLogger/blob/swift3/README.md) or [the API documentation](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/index.html).
Want to learn more about CleanroomLogger? Check out [the README](https://github.com/emaloney/CleanroomLogger/blob/master/README.md) or [the API documentation](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/index.html).

**_Happy coding!_**
40 changes: 18 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Gilt Tech logo](https://raw.githubusercontent.com/gilt/Cleanroom/swift3/Assets/gilt-tech-logo.png)
![Gilt Tech logo](https://raw.githubusercontent.com/gilt/Cleanroom/master/Assets/gilt-tech-logo.png)

# CleanroomLogger

Expand All @@ -11,18 +11,14 @@ CleanroomLogger is part of [the Cleanroom Project](https://github.com/gilt/Clean

### Swift compatibility

**Important:** This is the `swift3` branch. It uses **Swift 3.0** and **requires Xcode 8** to compile.
This is the `master` branch. It uses **Swift 3.0** and **requires Xcode 8** to compile.

This branch is still under active development. Expect breaking changes to the API, the build system and/or the project structure at any time. **Be sure to lock against a specific commit if you simultaneously require Swift 3 and stability.**

If you need Swift 2.3 compatibility, use the [`master`](https://github.com/emaloney/CleanroomLogger) branch, which requires Xcode 8.

#### Current status

Branch|Build status
--------|------------------------
[`master`](https://github.com/emaloney/CleanroomLogger)|[![Build status: master branch](https://travis-ci.org/emaloney/CleanroomLogger.svg?branch=master)](https://travis-ci.org/emaloney/CleanroomLogger)
[`swift3`](https://github.com/emaloney/CleanroomLogger/tree/swift3)|[![Build status: swift3 branch](https://travis-ci.org/emaloney/CleanroomLogger.svg?branch=swift3)](https://travis-ci.org/emaloney/CleanroomLogger)


#### Why CleanroomLogger?
Expand All @@ -33,20 +29,20 @@ As with `NSLog()`, CleanroomLogger messages are (by default) directed to the App

However, CleanroomLogger adds a number of important features not provided by `NSLog()`:

1. **Each log message is associated with a [`LogSeverity`](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/Enums/LogSeverity.html) value indicating the importance of that message.** This enables you to very easily do things like squelch out low-priority messages—such as those logged with `.Debug` and `.Verbose` severity values—in production binaries, thereby lessening the amount of work your App Store build does at runtime.
1. **Each log message is associated with a [`LogSeverity`](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Enums/LogSeverity.html) value indicating the importance of that message.** This enables you to very easily do things like squelch out low-priority messages—such as those logged with `.Debug` and `.Verbose` severity values—in production binaries, thereby lessening the amount of work your App Store build does at runtime.

2. **CleanroomLogger makes it easy to find the _where_ your code is issuing log messages.** With `NSLog()` and `print()`, it can sometimes be difficult to figure out what code is responsible for generating log messages. When a message is constructed programmatically, for example, it may not be possible to find its source. CleanroomLogger outputs the file and line responsible for each log message, so you can literally *go straight to the source*.

3. **CleanroomLogger provides code execution tracing functionality through the `trace()` function.** A simple no-argument function call is all that’s needed to log the source filename, line number and function name of the caller. This makes it easy to understand the path your code is taking as it executes.

4. **CleanroomLogger is _configurable_**; its behavior can be modified by through different configuration options specified when logging is activated. You can configure the logging engine through the parameter values specified when constructing a new [`DefaultLogConfiguration`](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/Structs/DefaultLogConfiguration.html) instance, or you can provide your own implementation of the [`LogConfiguration`](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/Protocols/LogConfiguration.html) protocol if that doesn’t suit your needs.
4. **CleanroomLogger is _configurable_**; its behavior can be modified by through different configuration options specified when logging is activated. You can configure the logging engine through the parameter values specified when constructing a new [`DefaultLogConfiguration`](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Structs/DefaultLogConfiguration.html) instance, or you can provide your own implementation of the [`LogConfiguration`](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Protocols/LogConfiguration.html) protocol if that doesn’t suit your needs.

5. **CleanroomLogger is _extensible_**. Several extension points are available, allowing you to provide custom implementations for specific functionality within the logging process:
- A [`LogFilter`](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/Protocols/LogFilter.html) implementation can inspect--and potentially block--any log message before it is recorded.
- A custom [`LogFormatter`](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/Protocols/LogFormatter.html) implementation can be used to generate string representations in a specific format for each `LogEntry` that gets recorded
- The [`LogRecorder`](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/Protocols/LogRecorder.html) protocol makes it possible to create custom log message storage implementations. This is where to start if you want to provide a custom solution to write log messages to a database table, a local file, or a remote HTTP endpoint, for example.
- A [`LogFilter`](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Protocols/LogFilter.html) implementation can inspect--and potentially block--any log message before it is recorded.
- A custom [`LogFormatter`](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Protocols/LogFormatter.html) implementation can be used to generate string representations in a specific format for each `LogEntry` that gets recorded
- The [`LogRecorder`](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Protocols/LogRecorder.html) protocol makes it possible to create custom log message storage implementations. This is where to start if you want to provide a custom solution to write log messages to a database table, a local file, or a remote HTTP endpoint, for example.

6. **CleanroomLogger puts the application developer in control.** The behavior of logging is set once, early in the application within the `UIApplicationDelegate` implementation; after that, the configuration is immutable for the remainder of the application’s life. Any code using CleanroomLogger through [the `Log` API](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/Structs/Log.html), including embedded frameworks, shared libraries, Cocoapods, etc. will automatically adhere to the policy established by the application developer. Embedded code that uses CleanroomLogger is inherently *well behaved*, whereas code using plain old `NSLog()` is not; third-party code using `NSLog()` give no control to the application developer.
6. **CleanroomLogger puts the application developer in control.** The behavior of logging is set once, early in the application within the `UIApplicationDelegate` implementation; after that, the configuration is immutable for the remainder of the application’s life. Any code using CleanroomLogger through [the `Log` API](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Structs/Log.html), including embedded frameworks, shared libraries, Cocoapods, etc. will automatically adhere to the policy established by the application developer. Embedded code that uses CleanroomLogger is inherently *well behaved*, whereas code using plain old `NSLog()` is not; third-party code using `NSLog()` give no control to the application developer.

7. **CleanroomLogger is respectful of the calling thread.** `NSLog()` does a lot of work on the calling thread, and when used from the main thread, it can lead to lower display frame rates. When CleanroomLogger accepts a log request, it is immediately handed off to an asynchronous background queue for further dispatching, letting the calling thread get back to work as quickly as possible. Each `LogRecorder` also maintains its own asynchronous background queue, which is used to format log messages and write them to the underlying storage facility. This design ensures that if one recorder gets bogged down, it won’t prevent the processing of log messages by other recorders.

Expand All @@ -55,7 +51,7 @@ However, CleanroomLogger adds a number of important features not provided by `NS

### License

CleanroomLogger is distributed under [the MIT license](https://github.com/emaloney/CleanroomLogger/blob/swift3/LICENSE).
CleanroomLogger is distributed under [the MIT license](https://github.com/emaloney/CleanroomLogger/blob/master/LICENSE).

CleanroomLogger is provided for your use—free-of-charge—on an as-is basis. We make no guarantees, promises or apologies. *Caveat developer.*

Expand All @@ -69,20 +65,20 @@ The simplest way to integrate CleanroomLogger is with the [Carthage](https://git
First, add this line to your [`Cartfile`](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile):

```
github "emaloney/CleanroomLogger" ~> 0.0.0
github "emaloney/CleanroomLogger" ~> 3.0.0
```

Then, use the `carthage` command to [update your dependencies](https://github.com/Carthage/Carthage#upgrading-frameworks).

Finally, you’ll need to [integrate CleanroomLogger into your project](https://github.com/emaloney/CleanroomLogger/blob/swift3/INTEGRATION.md) in order to use [the API](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/index.html) it provides.
Finally, you’ll need to [integrate CleanroomLogger into your project](https://github.com/emaloney/CleanroomLogger/blob/master/INTEGRATION.md) in order to use [the API](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/index.html) it provides.

Once successfully integrated, just add the following `import` statement to any Swift file where you want to use CleanroomLogger:

```swift
import CleanroomLogger
```

See [the Integration document](https://github.com/emaloney/CleanroomLogger/blob/swift3/INTEGRATION.md) for additional details on integrating CleanroomLogger into your project.
See [the Integration document](https://github.com/emaloney/CleanroomLogger/blob/master/INTEGRATION.md) for additional details on integrating CleanroomLogger into your project.

## Using CleanroomLogger

Expand Down Expand Up @@ -354,7 +350,7 @@ let formatter = FieldBasedLogFormatter(fields: [.Timestamp(.UNIX),

### API documentation

For detailed information on using CleanroomLogger, [API documentation](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/index.html) is available.
For detailed information on using CleanroomLogger, [API documentation](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/index.html) is available.


#### XcodeColors Support
Expand All @@ -365,9 +361,9 @@ When it is in use, XcodeColors sets the value of the environment variable `Xcode

> If you have XcodeColors installed but would *not* like to enable CleanroomLogger support for it, pass `true` for `suppressColors` or `nil` for `colorizer` when instantiating your `XcodeLogConfiguration`.
The built-in color scheme—which you can override by supplying your own [`ColorTable`](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/Protocols/ColorTable.html)—emphasizes important information while seeking to make less important messages fade into the background when you’re not focused on them:
The built-in color scheme—which you can override by supplying your own [`ColorTable`](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/Protocols/ColorTable.html)—emphasizes important information while seeking to make less important messages fade into the background when you’re not focused on them:

<img alt="XcodeColors sample output" src="https://raw.githubusercontent.com/emaloney/CleanroomLogger/swift3/Documentation/Images/XcodeColors-sample.png" width="565" height="98"/>
<img alt="XcodeColors sample output" src="https://raw.githubusercontent.com/emaloney/CleanroomLogger/master/Documentation/Images/XcodeColors-sample.png" width="565" height="98"/>

#### Enabling XcodeColors for iOS, tvOS & watchOS

Expand All @@ -383,7 +379,7 @@ Ensure that the **Environment Variables** section is expanded below, and click t

This will allow you to add a new environment variable within the runtime environment. Enter `XcodeColors` for the name and `YES` for the value, as shown in this example:

<img alt="Enabling XcodeColors via an Xcode build scheme" src="https://raw.githubusercontent.com/emaloney/CleanroomLogger/swift3/Documentation/Images/XcodeColors-build-scheme.png" width="650" height="360"/>
<img alt="Enabling XcodeColors via an Xcode build scheme" src="https://raw.githubusercontent.com/emaloney/CleanroomLogger/master/Documentation/Images/XcodeColors-build-scheme.png" width="650" height="360"/>

When done, select the **Close** button.

Expand All @@ -397,7 +393,7 @@ If the `XcodeColors` environment variable is set to `YES` but is being run in wi

Those escape sequences will appear in your output instead of color:

<img alt="Raw XcodeColors escape sequences" src="https://raw.githubusercontent.com/emaloney/CleanroomLogger/swift3/Documentation/Images/XcodeColors-escape-sequences.png" width="650" height="85"/>
<img alt="Raw XcodeColors escape sequences" src="https://raw.githubusercontent.com/emaloney/CleanroomLogger/master/Documentation/Images/XcodeColors-escape-sequences.png" width="650" height="85"/>

If this happens, it means the XcodeColors plug-in is either not installed, or Xcode is not loading it upon launch.

Expand Down Expand Up @@ -470,5 +466,5 @@ If you’d like to contribute to this or any other Cleanroom Project repo, pleas

### Acknowledgements

[API documentation for CleanroomLogger](https://rawgit.com/emaloney/CleanroomLogger/swift3/Documentation/API/index.html) is generated using [Realm](http://realm.io)’s [jazzy](https://github.com/realm/jazzy/) project, maintained by [JP Simard](https://github.com/jpsim) and [Samuel E. Giddins](https://github.com/segiddins).
[API documentation for CleanroomLogger](https://rawgit.com/emaloney/CleanroomLogger/master/Documentation/API/index.html) is generated using [Realm](http://realm.io)’s [jazzy](https://github.com/realm/jazzy/) project, maintained by [JP Simard](https://github.com/jpsim) and [Samuel E. Giddins](https://github.com/segiddins).

0 comments on commit 981aba2

Please sign in to comment.