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
Copy file name to clipboardExpand all lines: shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Log/FileProviderLog.swift
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -153,18 +153,18 @@ public actor FileProviderLog: FileProviderLogging {
Copy file name to clipboardExpand all lines: shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Log/FileProviderLogMessage.swift
+52-1Lines changed: 52 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,17 @@ import Foundation
7
7
/// A data model for the rich JSON object to be written into the JSON lines log files.
8
8
///
9
9
publicstructFileProviderLogMessage:Encodable{
10
+
enumCodingKeys:CodingKey{
11
+
case category
12
+
case date
13
+
case details
14
+
case file
15
+
case function
16
+
case level
17
+
case line
18
+
case message
19
+
}
20
+
10
21
///
11
22
/// As used with `Logger` of the `os` framework.
12
23
///
@@ -25,11 +36,26 @@ public struct FileProviderLogMessage: Encodable {
25
36
///
26
37
publicletdetails:[String:FileProviderLogDetail?]
27
38
39
+
///
40
+
/// The source code file which generates the log message.
41
+
///
42
+
publicletfile:String?
43
+
44
+
///
45
+
/// The calling function generating this message.
46
+
///
47
+
publicletfunction:String?
48
+
28
49
///
29
50
/// Textual representation of the associated `OSLogType`.
30
51
///
31
52
publicletlevel:String
32
53
54
+
///
55
+
/// The line in the source code file which generates this message.
56
+
///
57
+
publicletline:UInt?
58
+
33
59
///
34
60
/// The actual text for the entry.
35
61
///
@@ -38,7 +64,7 @@ public struct FileProviderLogMessage: Encodable {
38
64
///
39
65
/// Custom initializer to support arbitrary types as detail values.
Copy file name to clipboardExpand all lines: shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Log/FileProviderLogger.swift
+28-16Lines changed: 28 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -37,51 +37,63 @@ public struct FileProviderLogger: Sendable {
37
37
/// Dispatch a task to write a message with the level `OSLogType.debug`.
38
38
///
39
39
/// - Parameters:
40
-
/// - message: The main text message of the entry in the logs.
41
-
/// - details: Additional contextual data.
40
+
/// - message: A human-readable message, preferably generic and without interpolations. The `details` argument is for arguments.
41
+
/// - details: Structured and contextual details about a message.
42
+
/// - file: Implementations should have `#filePath` as the default value for this.
43
+
/// - function: Implementations should have `#function` as the default value for this.
44
+
/// - line: Implementations should have `#line` as the default value for this.
Copy file name to clipboardExpand all lines: shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Log/FileProviderLogging.swift
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,5 +12,14 @@ public protocol FileProviderLogging: Actor {
12
12
///
13
13
/// Usually, you do not need or want to use this but the methods provided by ``FileProviderLogger`` instead.
Copy file name to clipboardExpand all lines: shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKitMocks/FileProviderLogMock.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ public actor FileProviderLogMock: FileProviderLogging {
0 commit comments