You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logging.lifecycle.notice("App moved to background")
47
+
```swift
48
+
// AppDelegate, @main struct, or dependency container
49
+
let log =Logging(subsystem: "com.mycompany.MyApp")
52
50
```
53
51
54
-
### Configuring the subsystem
52
+
For quick prototyping the default init uses `"com.inesb.swift-logging"` as the subsystem:
55
53
56
-
`Logging.subsystem` defaults to `Bundle.main.bundleIdentifier`, so no setup is needed for app targets. Set it explicitly for framework or package targets:
54
+
```swift
55
+
let log =Logging()
56
+
```
57
+
58
+
### Basic logging
57
59
58
60
```swift
59
-
// Before any log call — AppDelegate or @main struct
60
-
Logging.subsystem="com.mycompany.MyFramework"
61
+
importLogging
62
+
63
+
let log =Logging(subsystem: "com.mycompany.MyApp")
0 commit comments