Skip to content

Commit

Permalink
Create CHANGELOG and improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
hkellaway committed Mar 28, 2021
1 parent 48eca59 commit b1877bf
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 3 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Change Log
All notable changes to this project will be documented in this file. [Semver](http://semver.org/) is used for versioning.

- `0.1.x` Releases - [0.1.0](#010)

---

## [0.1.0](https://github.com/hkellaway/Nog/releases/tag/0.1.0)
Released on 2021-03-28.

#### Added
- Logging network request URLs to console
- Ability to turn logging on/off

51 changes: 48 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
# Nog
# Nog: A Delicious Network Request Logger :coffee:

A delicious network request logger in Swift :coffee:
[![Swift](https://img.shields.io/badge/Swift-5.3-orange.svg)](https://swift.org/about/)
[![SPM](https://img.shields.io/badge/SPM-compatible-brightgreen.svg)](https://swift.org/package-manager/)
[![License](https://img.shields.io/badge/License-MIT-lightgray.svg)](https://raw.githubusercontent.com/hkellaway/Nog/master/LICENSE)

:construction: Currently under construction :construction:
## Usage

> :bulb: Nog assumes usage of `URLSessionConfiguration.default`.
To start logging network requests, create an instance of `NetworkLogger` and call `start`:

``` swift
let myNetworkLogger = NetworkLogger()
myNetworkLogger.start()
```

Nog will print request URLs to the console:

```
[Nog] Request #1: URL => https://github.com/
```

To stop logging, simply call `stop`:

``` swift
myNetworkLogger.stop()
```

To check whether logging is currently on, call `isLogging`:

``` swift
myNetworkLogger.isLogging
```

See the [Demo](/Demo) project for sample usage.

## Installation

### Installation with Swift Package Manager

See [Adding Package Dependencies to Your App](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app). Search for `Nog` with *Owner* `hkellaway`. Point to the desired version or the `master` branch for the latest.

## Credits

Nog was created by [Harlan Kellaway](http://hkellaway.github.io) forked originally from [depoon/NetworkInterceptor](https://github.com/depoon/NetworkInterceptor/releases/tag/0.0.8). :heart: :green_heart:

## License

Nog is available under the MIT license. See the [LICENSE](https://raw.githubusercontent.com/hkellaway/Nog/master/LICENSE) file for more info.

0 comments on commit b1877bf

Please sign in to comment.