Skip to content

Commit

Permalink
Merge pull request #1 from akidon0000/update-readme
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
akidon0000 committed Feb 16, 2024
2 parents ac51006 + 305b92a commit 1ea9181
Showing 1 changed file with 72 additions and 1 deletion.
73 changes: 72 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,72 @@
# swift-aklogger
# swift-aklog
[![Release](https://img.shields.io/github/v/release/akidon0000/swift-aklog)](https://github.com/akidon0000/swift-aklog/releases/latest)
[![Swift Compatibility](https://img.shields.io/endpoint?url=https://swiftpackageindex.com/api/packages/akidon0000/swift-aklog/badge?type=swift-versions)](https://swiftpackageindex.com/akidon0000/swift-aklog)
[![Platform Compatibility](https://img.shields.io/endpoint?url=https://swiftpackageindex.com/api/packages/akidon0000/swift-aklog/badge?type=platforms)](https://swiftpackageindex.com/akidon0000/swift-aklog)
[![License](https://img.shields.io/github/license/akidon0000/swift-aklog)](https://github.com/akidon0000/swift-aklog/blob/main/LICENSE)
[![Twitter](https://img.shields.io/twitter/follow/akidon0000?style=social)](https://twitter.com/akidon0000)

簡単に詳細なログを出力するためのライブラリです。



## インストール方法

### Swift Package Manager

#### Package

このパッケージを`Package.swift`に追加し、ターゲットの依存関係に含めることができます。

```swift
let package = Package(
dependencies: [
.package(url: "https://github.com/akidon0000/swift-aklog", .upToNextMajor(from: "0.0.1")),
],
targets: [
.target(
name: "<your-target-name>",
dependencies: ["AKLog"]),
]
)
```

#### Xcode

[ドキュメント](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app)


## 使い方

`AKLog` をimportして使います。

```swift
import AKLog

class MainViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
AKLog.debug("メッセージ")
// 00:00:00 [DEBUG] MainViewController.swift:6 - viewDidLoad:メッセージ
}
}
```

ログには以下の種類があります。

```swift
AKLog.trace("メッセージ")
AKLog.debug("メッセージ")
AKLog.info("メッセージ")
AKLog.notice("メッセージ")
AKLog.warn("メッセージ")
AKLog.error("メッセージ")
AKLog.critical("メッセージ")
```

## 統計

![Alt](https://repobeats.axiom.co/api/embed/6ad6de677b5d371146416b8047d9cde9aac4507b.svg "Repobeats analytics image")

参考
https://github.com/uhooi/swift-string-transform
https://github.com/melke/SlimLogger

0 comments on commit 1ea9181

Please sign in to comment.