Skip to content

Commit c8718e9

Browse files
committed
Improve docs.
1 parent e4d4894 commit c8718e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# swift-log-file
22

3+
## Example: Just logging to a file
4+
35
```
46
let logFileURL = URL(/* your local log file here */)
57
let logger = try FileLogHandler.fileLogger(label: "Foobar", localFile: logFileURL)
68
79
logger.error("Test Test Test")
810
```
911

12+
## Example: Logging to both the standard output (Xcode console if using Xcode) and a file.
13+
1014
```
1115
let logFileURL = try getDocumentsDirectory().appendingPathComponent(logFileName)
1216

0 commit comments

Comments
 (0)