From 19d3fd7b1209ce426668cfad986f265c91bde628 Mon Sep 17 00:00:00 2001 From: tomer doron Date: Fri, 17 Dec 2021 01:53:31 +0000 Subject: [PATCH] publish 1.4.2 docs --- docs/1.4.2/Logging/Enums.html | 162 ++ docs/1.4.2/Logging/Enums/LoggingSystem.html | 192 ++ docs/1.4.2/Logging/Protocols.html | 255 +++ docs/1.4.2/Logging/Protocols/LogHandler.html | 538 ++++++ docs/1.4.2/Logging/Structs.html | 305 +++ docs/1.4.2/Logging/Structs/Logger.html | 1456 ++++++++++++++ docs/1.4.2/Logging/Structs/Logger/Level.html | 391 ++++ .../1.4.2/Logging/Structs/Logger/Message.html | 235 +++ .../Logging/Structs/Logger/MetadataValue.html | 550 ++++++ .../Logging/Structs/MultiplexLogHandler.html | 353 ++++ .../Logging/Structs/StreamLogHandler.html | 322 ++++ .../Structs/SwiftLogNoOpLogHandler.html | 320 ++++ docs/1.4.2/Logging/badge.svg | 28 + docs/1.4.2/Logging/css/highlight.css | 202 ++ docs/1.4.2/Logging/css/jazzy.css | 404 ++++ docs/1.4.2/Logging/img/carat.png | Bin 0 -> 274 bytes docs/1.4.2/Logging/img/dash.png | Bin 0 -> 1338 bytes docs/1.4.2/Logging/img/gh.png | Bin 0 -> 1571 bytes docs/1.4.2/Logging/img/spinner.gif | Bin 0 -> 1849 bytes docs/1.4.2/Logging/index.html | 126 ++ docs/1.4.2/Logging/js/jazzy.js | 74 + docs/1.4.2/Logging/js/jazzy.search.js | 74 + docs/1.4.2/Logging/js/jquery.min.js | 2 + docs/1.4.2/Logging/js/lunr.min.js | 6 + docs/1.4.2/Logging/js/typeahead.jquery.js | 1694 +++++++++++++++++ docs/1.4.2/Logging/search.json | 1 + docs/1.4.2/Logging/undocumented.json | 124 ++ docs/current/Logging/Enums.html | 26 +- docs/current/Logging/Enums/LoggingSystem.html | 34 +- docs/current/Logging/Protocols.html | 46 +- .../current/Logging/Protocols/LogHandler.html | 130 +- docs/current/Logging/Structs.html | 109 +- docs/current/Logging/Structs/Logger.html | 1235 ++++++------ .../current/Logging/Structs/Logger/Level.html | 49 +- .../Logging/Structs/Logger/Message.html | 41 +- .../Logging/Structs/Logger/MetadataValue.html | 72 +- .../Logging/Structs/MultiplexLogHandler.html | 99 +- .../Logging/Structs/StreamLogHandler.html | 57 +- .../Structs/SwiftLogNoOpLogHandler.html | 320 ++++ docs/current/Logging/badge.svg | 16 +- docs/current/Logging/css/highlight.css | 400 ++-- docs/current/Logging/css/jazzy.css | 20 +- docs/current/Logging/index.html | 24 +- docs/current/Logging/js/jazzy.js | 17 +- docs/current/Logging/js/jazzy.search.js | 4 + docs/current/Logging/js/jquery.min.js | 4 +- docs/current/Logging/js/lunr.min.js | 7 +- docs/current/Logging/js/typeahead.jquery.js | 52 +- docs/current/Logging/search.json | 2 +- docs/current/Logging/undocumented.json | 120 +- 50 files changed, 9655 insertions(+), 1043 deletions(-) create mode 100644 docs/1.4.2/Logging/Enums.html create mode 100644 docs/1.4.2/Logging/Enums/LoggingSystem.html create mode 100644 docs/1.4.2/Logging/Protocols.html create mode 100644 docs/1.4.2/Logging/Protocols/LogHandler.html create mode 100644 docs/1.4.2/Logging/Structs.html create mode 100644 docs/1.4.2/Logging/Structs/Logger.html create mode 100644 docs/1.4.2/Logging/Structs/Logger/Level.html create mode 100644 docs/1.4.2/Logging/Structs/Logger/Message.html create mode 100644 docs/1.4.2/Logging/Structs/Logger/MetadataValue.html create mode 100644 docs/1.4.2/Logging/Structs/MultiplexLogHandler.html create mode 100644 docs/1.4.2/Logging/Structs/StreamLogHandler.html create mode 100644 docs/1.4.2/Logging/Structs/SwiftLogNoOpLogHandler.html create mode 100644 docs/1.4.2/Logging/badge.svg create mode 100644 docs/1.4.2/Logging/css/highlight.css create mode 100644 docs/1.4.2/Logging/css/jazzy.css create mode 100755 docs/1.4.2/Logging/img/carat.png create mode 100755 docs/1.4.2/Logging/img/dash.png create mode 100755 docs/1.4.2/Logging/img/gh.png create mode 100644 docs/1.4.2/Logging/img/spinner.gif create mode 100644 docs/1.4.2/Logging/index.html create mode 100755 docs/1.4.2/Logging/js/jazzy.js create mode 100644 docs/1.4.2/Logging/js/jazzy.search.js create mode 100644 docs/1.4.2/Logging/js/jquery.min.js create mode 100644 docs/1.4.2/Logging/js/lunr.min.js create mode 100644 docs/1.4.2/Logging/js/typeahead.jquery.js create mode 100644 docs/1.4.2/Logging/search.json create mode 100644 docs/1.4.2/Logging/undocumented.json create mode 100644 docs/current/Logging/Structs/SwiftLogNoOpLogHandler.html diff --git a/docs/1.4.2/Logging/Enums.html b/docs/1.4.2/Logging/Enums.html new file mode 100644 index 0000000..6527b28 --- /dev/null +++ b/docs/1.4.2/Logging/Enums.html @@ -0,0 +1,162 @@ + + + + Enumerations Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Enumerations

+

The following enumerations are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + LoggingSystem + +
    +
    +
    +
    +
    +
    +

    The LoggingSystem is a global facility where the default logging backend implementation (LogHandler) can be +configured. LoggingSystem is set up just once in a given program to set up the desired logging backend +implementation.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum LoggingSystem
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Enums/LoggingSystem.html b/docs/1.4.2/Logging/Enums/LoggingSystem.html new file mode 100644 index 0000000..b7ac362 --- /dev/null +++ b/docs/1.4.2/Logging/Enums/LoggingSystem.html @@ -0,0 +1,192 @@ + + + + LoggingSystem Enumeration Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

LoggingSystem

+
+
+ +
public enum LoggingSystem
+ +
+
+

The LoggingSystem is a global facility where the default logging backend implementation (LogHandler) can be +configured. LoggingSystem is set up just once in a given program to set up the desired logging backend +implementation.

+ + +
+
+ +
+
+
+
    +
  • +
    + + + + bootstrap(_:) + +
    +
    +
    +
    +
    +
    +

    bootstrap is a one-time configuration function which globally selects the desired logging backend +implementation. bootstrap can be called at maximum once in any given program, calling it more than once will +lead to undefined behavior, most likely a crash.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func bootstrap(_ factory: @escaping (String) -> LogHandler)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + factory + + +
    +

    A closure that given a Logger identifier, produces an instance of the LogHandler.

    +
    +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Protocols.html b/docs/1.4.2/Logging/Protocols.html new file mode 100644 index 0000000..1038c74 --- /dev/null +++ b/docs/1.4.2/Logging/Protocols.html @@ -0,0 +1,255 @@ + + + + Protocols Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Protocols

+

The following protocols are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + LogHandler + +
    +
    +
    +
    +
    +
    +

    A LogHandler is an implementation of a logging backend.

    + +

    This type is an implementation detail and should not normally be used, unless implementing your own logging backend. +To use the SwiftLog API, please refer to the documentation of Logger.

    +

    Implementation requirements

    + +

    To implement your own LogHandler you should respect a few requirements that are necessary so applications work +as expected regardless of the selected LogHandler implementation.

    + +
      +
    • The LogHandler must be a struct.
    • +
    • The metadata and logLevel properties must be implemented so that setting them on a Logger does not affect +other Loggers.
    • +
    +

    Treat log level & metadata as values

    + +

    When developing your LogHandler, please make sure the following test works.

    +
    LoggingSystem.bootstrap(MyLogHandler.init) // your LogHandler might have a different bootstrapping step
    +var logger1 = Logger(label: "first logger")
    +logger1.logLevel = .debug
    +logger1[metadataKey: "only-on"] = "first"
    +
    +var logger2 = logger1
    +logger2.logLevel = .error                  // this must not override `logger1`'s log level
    +logger2[metadataKey: "only-on"] = "second" // this must not override `logger1`'s metadata
    +
    +XCTAssertEqual(.debug, logger1.logLevel)
    +XCTAssertEqual(.error, logger2.logLevel)
    +XCTAssertEqual("first", logger1[metadataKey: "only-on"])
    +XCTAssertEqual("second", logger2[metadataKey: "only-on"])
    +
    +

    Special cases

    + +

    In certain special cases, the log level behaving like a value on Logger might not be what you want. For example, +you might want to set the log level across all Loggers to .debug when say a signal (eg. SIGUSR1) is received +to be able to debug special failures in production. This special case is acceptable but we urge you to create a +solution specific to your LogHandler implementation to achieve that. Please find an example implementation of this +behavior below, on reception of the signal you would call +LogHandlerWithGlobalLogLevelOverride.overrideGlobalLogLevel = .debug, for example.

    +
    import class Foundation.NSLock
    +
    +public struct LogHandlerWithGlobalLogLevelOverride: LogHandler {
    +    // the static properties hold the globally overridden log level (if overridden)
    +    private static let overrideLock = NSLock()
    +    private static var overrideLogLevel: Logger.Level? = nil
    +
    +    // this holds the log level if not overridden
    +    private var _logLevel: Logger.Level = .info
    +
    +    // metadata storage
    +    public var metadata: Logger.Metadata = [:]
    +
    +    public init(label: String) {
    +        // [...]
    +    }
    +
    +    public var logLevel: Logger.Level {
    +        // when we get asked for the log level, we check if it was globally overridden or not
    +        get {
    +            LogHandlerWithGlobalLogLevelOverride.overrideLock.lock()
    +            defer { LogHandlerWithGlobalLogLevelOverride.overrideLock.unlock() }
    +            return LogHandlerWithGlobalLogLevelOverride.overrideLogLevel ?? self._logLevel
    +        }
    +        // we set the log level whenever we're asked (note: this might not have an effect if globally
    +        // overridden)
    +        set {
    +            self._logLevel = newValue
    +        }
    +    }
    +
    +    public func log(level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata?,
    +                    source: String, file: String, function: String, line: UInt) {
    +        // [...]
    +    }
    +
    +    public subscript(metadataKey metadataKey: String) -> Logger.Metadata.Value? {
    +        get {
    +            return self.metadata[metadataKey]
    +        }
    +        set(newValue) {
    +            self.metadata[metadataKey] = newValue
    +        }
    +    }
    +
    +    // this is the function to globally override the log level, it is not part of the `LogHandler` protocol
    +    public static func overrideGlobalLogLevel(_ logLevel: Logger.Level) {
    +        LogHandlerWithGlobalLogLevelOverride.overrideLock.lock()
    +        defer { LogHandlerWithGlobalLogLevelOverride.overrideLock.unlock() }
    +        LogHandlerWithGlobalLogLevelOverride.overrideLogLevel = logLevel
    +    }
    +}
    +
    + +

    Please note that the above LogHandler will still pass the ‘log level is a value’ test above it iff the global log +level has not been overridden. And most importantly it passes the requirement listed above: A change to the log +level on one Logger should not affect the log level of another Logger variable.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol LogHandler
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Protocols/LogHandler.html b/docs/1.4.2/Logging/Protocols/LogHandler.html new file mode 100644 index 0000000..28b051c --- /dev/null +++ b/docs/1.4.2/Logging/Protocols/LogHandler.html @@ -0,0 +1,538 @@ + + + + LogHandler Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

LogHandler

+
+
+ +
public protocol LogHandler
+ +
+
+

A LogHandler is an implementation of a logging backend.

+ +

This type is an implementation detail and should not normally be used, unless implementing your own logging backend. +To use the SwiftLog API, please refer to the documentation of Logger.

+

Implementation requirements

+ +

To implement your own LogHandler you should respect a few requirements that are necessary so applications work +as expected regardless of the selected LogHandler implementation.

+ +
    +
  • The LogHandler must be a struct.
  • +
  • The metadata and logLevel properties must be implemented so that setting them on a Logger does not affect +other Loggers.
  • +
+

Treat log level & metadata as values

+ +

When developing your LogHandler, please make sure the following test works.

+
LoggingSystem.bootstrap(MyLogHandler.init) // your LogHandler might have a different bootstrapping step
+var logger1 = Logger(label: "first logger")
+logger1.logLevel = .debug
+logger1[metadataKey: "only-on"] = "first"
+
+var logger2 = logger1
+logger2.logLevel = .error                  // this must not override `logger1`'s log level
+logger2[metadataKey: "only-on"] = "second" // this must not override `logger1`'s metadata
+
+XCTAssertEqual(.debug, logger1.logLevel)
+XCTAssertEqual(.error, logger2.logLevel)
+XCTAssertEqual("first", logger1[metadataKey: "only-on"])
+XCTAssertEqual("second", logger2[metadataKey: "only-on"])
+
+

Special cases

+ +

In certain special cases, the log level behaving like a value on Logger might not be what you want. For example, +you might want to set the log level across all Loggers to .debug when say a signal (eg. SIGUSR1) is received +to be able to debug special failures in production. This special case is acceptable but we urge you to create a +solution specific to your LogHandler implementation to achieve that. Please find an example implementation of this +behavior below, on reception of the signal you would call +LogHandlerWithGlobalLogLevelOverride.overrideGlobalLogLevel = .debug, for example.

+
import class Foundation.NSLock
+
+public struct LogHandlerWithGlobalLogLevelOverride: LogHandler {
+    // the static properties hold the globally overridden log level (if overridden)
+    private static let overrideLock = NSLock()
+    private static var overrideLogLevel: Logger.Level? = nil
+
+    // this holds the log level if not overridden
+    private var _logLevel: Logger.Level = .info
+
+    // metadata storage
+    public var metadata: Logger.Metadata = [:]
+
+    public init(label: String) {
+        // [...]
+    }
+
+    public var logLevel: Logger.Level {
+        // when we get asked for the log level, we check if it was globally overridden or not
+        get {
+            LogHandlerWithGlobalLogLevelOverride.overrideLock.lock()
+            defer { LogHandlerWithGlobalLogLevelOverride.overrideLock.unlock() }
+            return LogHandlerWithGlobalLogLevelOverride.overrideLogLevel ?? self._logLevel
+        }
+        // we set the log level whenever we're asked (note: this might not have an effect if globally
+        // overridden)
+        set {
+            self._logLevel = newValue
+        }
+    }
+
+    public func log(level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata?,
+                    source: String, file: String, function: String, line: UInt) {
+        // [...]
+    }
+
+    public subscript(metadataKey metadataKey: String) -> Logger.Metadata.Value? {
+        get {
+            return self.metadata[metadataKey]
+        }
+        set(newValue) {
+            self.metadata[metadataKey] = newValue
+        }
+    }
+
+    // this is the function to globally override the log level, it is not part of the `LogHandler` protocol
+    public static func overrideGlobalLogLevel(_ logLevel: Logger.Level) {
+        LogHandlerWithGlobalLogLevelOverride.overrideLock.lock()
+        defer { LogHandlerWithGlobalLogLevelOverride.overrideLock.unlock() }
+        LogHandlerWithGlobalLogLevelOverride.overrideLogLevel = logLevel
+    }
+}
+
+ +

Please note that the above LogHandler will still pass the ‘log level is a value’ test above it iff the global log +level has not been overridden. And most importantly it passes the requirement listed above: A change to the log +level on one Logger should not affect the log level of another Logger variable.

+ + +
+
+ +
+
+
+
    +
  • +
    + + + + log(level:message:metadata:source:file:function:line:) + + + Default implementation + +
    +
    +
    +
    +
    +
    +

    This method is called when a LogHandler must emit a log message. There is no need for the LogHandler to +check if the level is above or below the configured logLevel as Logger already performed this check and +determined that a message should be logged.

    + +
    +

    Default Implementation

    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func log(level: Logger.Level,
    +         message: Logger.Message,
    +         metadata: Logger.Metadata?,
    +         source: String,
    +         file: String,
    +         function: String,
    +         line: UInt)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + level + + +
    +

    The log level the message was logged at.

    +
    +
    + + message + + +
    +

    The message to log. To obtain a String representation call message.description.

    +
    +
    + + metadata + + +
    +

    The metadata associated to this log message.

    +
    +
    + + source + + +
    +

    The source where the log message originated, for example the logging module.

    +
    +
    + + file + + +
    +

    The file the log message was emitted from.

    +
    +
    + + function + + +
    +

    The function the log line was emitted from.

    +
    +
    + + line + + +
    +

    The line the log message was emitted from.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + log(level:message:metadata:file:function:line:) + + + Default implementation + +
    +
    +
    +
    +
    +
    +

    SwiftLog 1.0 compatibility method. Please do not implement, implement +log(level:message:metadata:source:file:function:line:) instead.

    + +
    +

    Default Implementation

    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @available(*, deprecated, renamed: "log(level:message:metadata:source:file:function:line:﹚")
    +func log(level: Logging.Logger.Level, message: Logging.Logger.Message, metadata: Logging.Logger.Metadata?, file: String, function: String, line: UInt)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Add, remove, or change the logging metadata.

    +
    +

    Note

    +

    LogHandlers must treat logging metadata as a value type. This means that the change in metadata must + only affect this very LogHandler.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    subscript(metadataKey _: String) -> Logger.Metadata.Value? { get set }
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + metadataKey + + +
    +

    The key for the metadata item

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + metadata + +
    +
    +
    +
    +
    +
    +

    Get or set the entire metadata storage as a dictionary.

    +
    +

    Note

    + LogHandlers must treat logging metadata as a value type. This means that the change in metadata must + only affect this very LogHandler. + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var metadata: Logger.Metadata { get set }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + logLevel + +
    +
    +
    +
    +
    +
    +

    Get or set the configured log level.

    +
    +

    Note

    + LogHandlers must treat the log level as a value type. This means that the change in metadata must + only affect this very LogHandler. It is acceptable to provide some form of global log level override + that means a change in log level on a particular LogHandler might not be reflected in any + LogHandler. + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var logLevel: Logger.Level { get set }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Structs.html b/docs/1.4.2/Logging/Structs.html new file mode 100644 index 0000000..60e0bde --- /dev/null +++ b/docs/1.4.2/Logging/Structs.html @@ -0,0 +1,305 @@ + + + + Structures Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Structures

+

The following structures are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + Logger + +
    +
    +
    +
    +
    +
    +

    A Logger is the central type in SwiftLog. Its central function is to emit log messages using one of the methods +corresponding to a log level.

    + +

    Loggers are value types with respect to the logLevel and the metadata (as well as the immutable label +and the selected LogHandler). Therefore, Loggers are suitable to be passed around between libraries if you want +to preserve metadata across libraries.

    + +

    The most basic usage of a Logger is

    +
    logger.info("Hello World!")
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Logger
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + MultiplexLogHandler + +
    +
    +
    +
    +
    +
    +

    A pseudo-LogHandler that can be used to send messages to multiple other LogHandlers.

    +

    Effective Logger.Level

    + +

    When first initialized the multiplex log handlers’ log level is automatically set to the minimum of all the +passed in log handlers. This ensures that each of the handlers will be able to log at their appropriate level +any log events they might be interested in.

    + +

    Example: +If log handler A is logging at .debug level, and log handler B is logging at .info level, the constructed +MultiplexLogHandler([A, B])‘s effective log level will be set to .debug, meaning that debug messages will be +handled by this handler, while only logged by the underlying A log handler (since B’s log level is .info +and thus it would not actually log that log message).

    + +

    If the log level is set on a Logger backed by an MultiplexLogHandler the log level will apply to all +underlying log handlers, allowing a logger to still select at what level it wants to log regardless of if the underlying +handler is a multiplex or a normal one. If for some reason one might want to not allow changing a log level of a specific +handler passed into the multiplex log handler, this is possible by wrapping it in a handler which ignores any log level changes.

    +

    Effective Logger.Metadata

    + +

    Since a MultiplexLogHandler is a combination of multiple log handlers, the handling of metadata can be non-obvious. +For example, the underlying log handlers may have metadata of their own set before they are used to initialize the multiplex log handler.

    + +

    The multiplex log handler acts purely as proxy and does not make any changes to underlying handler metadata other than +proxying writes that users made on a Logger instance backed by this handler.

    + +

    Setting metadata is always proxied through to all underlying handlers, meaning that if a modification like +logger[metadataKey: "x"] = "y" is made, all underlying log handlers that this multiplex handler was initiated with +will observe this change.

    + +

    Reading metadata from the multiplex log handler MAY need to pick one of conflicting values if the underlying log handlers +were already initiated with some metadata before passing them into the multiplex handler. The multiplex handler uses +the order in which the handlers were passed in during its initialization as a priority indicator - the first handler’s +values are more important than the next handlers values, etc.

    + +

    Example: +If the multiplex log handler was initiated with two handlers like this: MultiplexLogHandler([handler1, handler2]). +The handlers each have some already set metadata: handler1 has metadata values for keys one and all, and handler2 +has values for keys two and all.

    + +

    A query through the multiplex log handler the key one naturally returns handler1’s value, and a query for two +naturally returns handler2’s value. Querying for the key all will return handler1’s value, as that handler was indicated +“more important” than the second handler. The same rule applies when querying for the metadata property of the +multiplex log handler - it constructs Metadata uniquing values.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct MultiplexLogHandler : LogHandler
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + StreamLogHandler + +
    +
    +
    +
    +
    +
    +

    StreamLogHandler is a simple implementation of LogHandler for directing +Logger output to either stderr or stdout via the factory methods.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct StreamLogHandler : LogHandler
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    No operation LogHandler, used when no logging is required

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct SwiftLogNoOpLogHandler : LogHandler
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Structs/Logger.html b/docs/1.4.2/Logging/Structs/Logger.html new file mode 100644 index 0000000..d1398b9 --- /dev/null +++ b/docs/1.4.2/Logging/Structs/Logger.html @@ -0,0 +1,1456 @@ + + + + Logger Structure Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Logger

+
+
+ +
public struct Logger
+ +
+
+

A Logger is the central type in SwiftLog. Its central function is to emit log messages using one of the methods +corresponding to a log level.

+ +

Loggers are value types with respect to the logLevel and the metadata (as well as the immutable label +and the selected LogHandler). Therefore, Loggers are suitable to be passed around between libraries if you want +to preserve metadata across libraries.

+ +

The most basic usage of a Logger is

+
logger.info("Hello World!")
+
+ + +
+
+ +
+
+
+
    +
  • +
    + + + + label + +
    +
    +
    +
    +
    +
    +

    An identifier of the creator of this Logger.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let label: String
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Log a message passing the log level as a parameter.

    + +

    If the logLevel passed to this method is more severe than the Logger‘s logLevel, it will be logged, +otherwise nothing will happen.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func log(level: Logger.Level,
    +                _ message: @autoclosure () -> Logger.Message,
    +                metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                source: @autoclosure () -> String? = nil,
    +                file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + level + + +
    +

    The log level to log message at. For the available log levels, see Logger.Level.

    +
    +
    + + message + + +
    +

    The message to be logged. message can be used with any string interpolation literal.

    +
    +
    + + metadata + + +
    +

    One-off metadata to attach to this log message.

    +
    +
    + + source + + +
    +

    The source this log messages originates from. Defaults + to the module emitting the log message (on Swift 5.3 or + newer and the folder name containing the log emitting file on Swift 5.2 or + older).

    +
    +
    + + file + + +
    +

    The file this log message originates from (there’s usually no need to pass it explicitly as it + defaults to #fileID (on Swift 5.3 or newer and #file on Swift 5.2 or older).

    +
    +
    + + function + + +
    +

    The function this log message originates from (there’s usually no need to pass it explicitly as + it defaults to #function).

    +
    +
    + + line + + +
    +

    The line this log message originates from (there’s usually no need to pass it explicitly as it + defaults to #line).

    +
    +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func log(level: Logger.Level,
    +                _ message: @autoclosure () -> Logger.Message,
    +                metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Add, change, or remove a logging metadata item.

    +
    +

    Note

    + Logging metadata behaves as a value that means a change to the logging metadata will only affect the + very Logger it was changed on. + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public subscript(metadataKey metadataKey: String) -> Logger.Metadata.Value? { get set }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + logLevel + +
    +
    +
    +
    +
    +
    +

    Get or set the log level configured for this Logger.

    +
    +

    Note

    + Loggers treat logLevel as a value. This means that a change in logLevel will only affect this + very Logger. It is acceptable for logging backends to have some form of global log level override + that affects multiple or even all loggers. This means a change in logLevel to one Logger might in + certain cases have no effect. + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public var logLevel: Logger.Level { get set }
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func trace(_ message: @autoclosure () -> Logger.Message,
    +                  metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                  source: @autoclosure () -> String? = nil,
    +                  file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func trace(_ message: @autoclosure () -> Logger.Message,
    +                  metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                  file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func debug(_ message: @autoclosure () -> Logger.Message,
    +                  metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                  source: @autoclosure () -> String? = nil,
    +                  file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func debug(_ message: @autoclosure () -> Logger.Message,
    +                  metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                  file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func info(_ message: @autoclosure () -> Logger.Message,
    +                 metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                 source: @autoclosure () -> String? = nil,
    +                 file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func info(_ message: @autoclosure () -> Logger.Message,
    +                 metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                 file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func notice(_ message: @autoclosure () -> Logger.Message,
    +                   metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                   source: @autoclosure () -> String? = nil,
    +                   file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func notice(_ message: @autoclosure () -> Logger.Message,
    +                   metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                   file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func warning(_ message: @autoclosure () -> Logger.Message,
    +                    metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                    source: @autoclosure () -> String? = nil,
    +                    file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func warning(_ message: @autoclosure () -> Logger.Message,
    +                    metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                    file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func error(_ message: @autoclosure () -> Logger.Message,
    +                  metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                  source: @autoclosure () -> String? = nil,
    +                  file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func error(_ message: @autoclosure () -> Logger.Message,
    +                  metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                  file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func critical(_ message: @autoclosure () -> Logger.Message,
    +                     metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                     source: @autoclosure () -> String? = nil,
    +                     file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func critical(_ message: @autoclosure () -> Logger.Message,
    +                     metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                     file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • +
    + + + + Metadata + +
    +
    +
    +
    +
    +
    +

    Metadata is a typealias for [String: Logger.MetadataValue] the type of the metadata storage.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Metadata = [String : MetadataValue]
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + MetadataValue + +
    +
    +
    +
    +
    +
    +

    A logging metadata value. Logger.MetadataValue is string, array, and dictionary literal convertible.

    + +

    MetadataValue provides convenient conformances to ExpressibleByStringInterpolation, +ExpressibleByStringLiteral, ExpressibleByArrayLiteral, and ExpressibleByDictionaryLiteral which means +that when constructing MetadataValues you should default to using Swift’s usual literals.

    + +

    Examples:

    + +
      +
    • prefer logger.info("user logged in", metadata: ["user-id": "\(user.id)"]) over +..., metadata: ["user-id": .string(user.id.description)])
    • +
    • prefer logger.info("user selected colors", metadata: ["colors": ["\(user.topColor)", "\(user.secondColor)"]]) +over ..., metadata: ["colors": .array([.string("\(user.topColor)"), .string("\(user.secondColor)")])
    • +
    • prefer logger.info("nested info", metadata: ["nested": ["fave-numbers": ["\(1)", "\(2)", "\(3)"], "foo": "bar"]]) +over ..., metadata: ["nested": .dictionary(["fave-numbers": ...])])
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MetadataValue
    +
    extension Logger.MetadataValue: Equatable
    +
    extension Logger.MetadataValue: ExpressibleByStringLiteral
    +
    extension Logger.MetadataValue: CustomStringConvertible
    +
    extension Logger.MetadataValue: ExpressibleByStringInterpolation
    +
    extension Logger.MetadataValue: ExpressibleByDictionaryLiteral
    +
    extension Logger.MetadataValue: ExpressibleByArrayLiteral
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Level + +
    +
    +
    +
    +
    +
    +

    The log level.

    + +

    Log levels are ordered by their severity, with .trace being the least severe and +.critical being the most severe.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Level : String, Codable, CaseIterable
    +
    extension Logger.Level: Comparable
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(label:) + +
    +
    +
    +
    +
    +
    +

    Construct a Logger given a label identifying the creator of the Logger.

    + +

    The label should identify the creator of the Logger. This can be an application, a sub-system, or even +a datatype.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(label: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + label + + +
    +

    An identifier for the creator of a Logger.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(label:factory:) + +
    +
    +
    +
    +
    +
    +

    Construct a Logger given a label identifying the creator of the Logger or a non-standard LogHandler.

    + +

    The label should identify the creator of the Logger. This can be an application, a sub-system, or even +a datatype.

    + +

    This initializer provides an escape hatch in case the global default logging backend implementation (set up +using LoggingSystem.bootstrap is not appropriate for this particular logger.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(label: String, factory: (String) -> LogHandler)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + label + + +
    +

    An identifier for the creator of a Logger.

    +
    +
    + + factory + + +
    +

    A closure creating non-standard LogHandlers.

    +
    +
    +
    + +
    +
    +
  • +
  • +
    + + + + Message + +
    +
    +
    +
    +
    +
    +

    Logger.Message represents a log message’s text. It is usually created using string literals.

    + +

    Example creating a Logger.Message:

    +
    let world: String = "world"
    +let myLogMessage: Logger.Message = "Hello \(world)"
    +
    + +

    Most commonly, Logger.Messages appear simply as the parameter to a logging method such as:

    +
    logger.info("Hello \(world)")
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Message : ExpressibleByStringLiteral, Equatable, CustomStringConvertible, ExpressibleByStringInterpolation
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Structs/Logger/Level.html b/docs/1.4.2/Logging/Structs/Logger/Level.html new file mode 100644 index 0000000..c40efa6 --- /dev/null +++ b/docs/1.4.2/Logging/Structs/Logger/Level.html @@ -0,0 +1,391 @@ + + + + Level Enumeration Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Level

+
+
+ +
public enum Level : String, Codable, CaseIterable
+
extension Logger.Level: Comparable
+ +
+
+

The log level.

+ +

Log levels are ordered by their severity, with .trace being the least severe and +.critical being the most severe.

+ + +
+
+ +
+
+
+
    +
  • +
    + + + + trace + +
    +
    +
    +
    +
    +
    +

    Appropriate for messages that contain information normally of use only when +tracing the execution of a program.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case trace
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + debug + +
    +
    +
    +
    +
    +
    +

    Appropriate for messages that contain information normally of use only when +debugging a program.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case debug
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + info + +
    +
    +
    +
    +
    +
    +

    Appropriate for informational messages.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case info
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + notice + +
    +
    +
    +
    +
    +
    +

    Appropriate for conditions that are not error conditions, but that may require +special handling.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case notice
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + warning + +
    +
    +
    +
    +
    +
    +

    Appropriate for messages that are not error conditions, but more severe than +.notice.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case warning
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    Appropriate for error conditions.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case error
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + critical + +
    +
    +
    +
    +
    +
    +

    Appropriate for critical error conditions that usually require immediate +attention.

    + +

    When a critical message is logged, the logging backend (LogHandler) is free to perform +more heavy-weight operations to capture system state (such as capturing stack traces) to facilitate +debugging.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case critical
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + <(_:_:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func < (lhs: Logger.Level, rhs: Logger.Level) -> Bool
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Structs/Logger/Message.html b/docs/1.4.2/Logging/Structs/Logger/Message.html new file mode 100644 index 0000000..1aca389 --- /dev/null +++ b/docs/1.4.2/Logging/Structs/Logger/Message.html @@ -0,0 +1,235 @@ + + + + Message Structure Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Message

+
+
+ +
public struct Message : ExpressibleByStringLiteral, Equatable, CustomStringConvertible, ExpressibleByStringInterpolation
+ +
+
+

Logger.Message represents a log message’s text. It is usually created using string literals.

+ +

Example creating a Logger.Message:

+
let world: String = "world"
+let myLogMessage: Logger.Message = "Hello \(world)"
+
+ +

Most commonly, Logger.Messages appear simply as the parameter to a logging method such as:

+
logger.info("Hello \(world)")
+
+ + +
+
+ +
+
+
+
    +
  • +
    + + + + StringLiteralType + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias StringLiteralType = String
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(stringLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(stringLiteral value: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Structs/Logger/MetadataValue.html b/docs/1.4.2/Logging/Structs/Logger/MetadataValue.html new file mode 100644 index 0000000..f7378b4 --- /dev/null +++ b/docs/1.4.2/Logging/Structs/Logger/MetadataValue.html @@ -0,0 +1,550 @@ + + + + MetadataValue Enumeration Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

MetadataValue

+
+
+ +
public enum MetadataValue
+
extension Logger.MetadataValue: Equatable
+
extension Logger.MetadataValue: ExpressibleByStringLiteral
+
extension Logger.MetadataValue: CustomStringConvertible
+
extension Logger.MetadataValue: ExpressibleByStringInterpolation
+
extension Logger.MetadataValue: ExpressibleByDictionaryLiteral
+
extension Logger.MetadataValue: ExpressibleByArrayLiteral
+ +
+
+

A logging metadata value. Logger.MetadataValue is string, array, and dictionary literal convertible.

+ +

MetadataValue provides convenient conformances to ExpressibleByStringInterpolation, +ExpressibleByStringLiteral, ExpressibleByArrayLiteral, and ExpressibleByDictionaryLiteral which means +that when constructing MetadataValues you should default to using Swift’s usual literals.

+ +

Examples:

+ +
    +
  • prefer logger.info("user logged in", metadata: ["user-id": "\(user.id)"]) over +..., metadata: ["user-id": .string(user.id.description)])
  • +
  • prefer logger.info("user selected colors", metadata: ["colors": ["\(user.topColor)", "\(user.secondColor)"]]) +over ..., metadata: ["colors": .array([.string("\(user.topColor)"), .string("\(user.secondColor)")])
  • +
  • prefer logger.info("nested info", metadata: ["nested": ["fave-numbers": ["\(1)", "\(2)", "\(3)"], "foo": "bar"]]) +over ..., metadata: ["nested": .dictionary(["fave-numbers": ...])])
  • +
+ + +
+
+ +
+
+
+
    +
  • +
    + + + + string(_:) + +
    +
    +
    +
    +
    +
    +

    A metadata value which is a String.

    + +

    Because MetadataValue implements ExpressibleByStringInterpolation, and ExpressibleByStringLiteral, +you don’t need to type .string(someType.description) you can use the string interpolation "\(someType)".

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case string(String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + stringConvertible(_:) + +
    +
    +
    +
    +
    +
    +

    A metadata value which is some CustomStringConvertible.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case stringConvertible(CustomStringConvertible)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + dictionary(_:) + +
    +
    +
    +
    +
    +
    +

    A metadata value which is a dictionary from String to Logger.MetadataValue.

    + +

    Because MetadataValue implements ExpressibleByDictionaryLiteral, you don’t need to type +.dictionary(["foo": .string("bar \(buz)")]), you can just use the more natural ["foo": "bar \(buz)"].

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case dictionary(Metadata)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + array(_:) + +
    +
    +
    +
    +
    +
    +

    A metadata value which is an array of Logger.MetadataValues.

    + +

    Because MetadataValue implements ExpressibleByArrayLiteral, you don’t need to type +.array([.string("foo"), .string("bar \(buz)")]), you can just use the more natural ["foo", "bar \(buz)"].

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case array([Metadata.Value])
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func == (lhs: Logger.Metadata.Value, rhs: Logger.Metadata.Value) -> Bool
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + StringLiteralType + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias StringLiteralType = String
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(stringLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(stringLiteral value: String)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String { get }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Key + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Key = String
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + Value + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Value = Logger.Metadata.Value
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(dictionaryLiteral elements: (String, Logger.Metadata.Value)...)
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + ArrayLiteralElement + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias ArrayLiteralElement = Logger.Metadata.Value
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(arrayLiteral:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(arrayLiteral elements: Logger.Metadata.Value...)
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Structs/MultiplexLogHandler.html b/docs/1.4.2/Logging/Structs/MultiplexLogHandler.html new file mode 100644 index 0000000..d86dd00 --- /dev/null +++ b/docs/1.4.2/Logging/Structs/MultiplexLogHandler.html @@ -0,0 +1,353 @@ + + + + MultiplexLogHandler Structure Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

MultiplexLogHandler

+
+
+ +
public struct MultiplexLogHandler : LogHandler
+ +
+
+

A pseudo-LogHandler that can be used to send messages to multiple other LogHandlers.

+

Effective Logger.Level

+ +

When first initialized the multiplex log handlers’ log level is automatically set to the minimum of all the +passed in log handlers. This ensures that each of the handlers will be able to log at their appropriate level +any log events they might be interested in.

+ +

Example: +If log handler A is logging at .debug level, and log handler B is logging at .info level, the constructed +MultiplexLogHandler([A, B])‘s effective log level will be set to .debug, meaning that debug messages will be +handled by this handler, while only logged by the underlying A log handler (since B’s log level is .info +and thus it would not actually log that log message).

+ +

If the log level is set on a Logger backed by an MultiplexLogHandler the log level will apply to all +underlying log handlers, allowing a logger to still select at what level it wants to log regardless of if the underlying +handler is a multiplex or a normal one. If for some reason one might want to not allow changing a log level of a specific +handler passed into the multiplex log handler, this is possible by wrapping it in a handler which ignores any log level changes.

+

Effective Logger.Metadata

+ +

Since a MultiplexLogHandler is a combination of multiple log handlers, the handling of metadata can be non-obvious. +For example, the underlying log handlers may have metadata of their own set before they are used to initialize the multiplex log handler.

+ +

The multiplex log handler acts purely as proxy and does not make any changes to underlying handler metadata other than +proxying writes that users made on a Logger instance backed by this handler.

+ +

Setting metadata is always proxied through to all underlying handlers, meaning that if a modification like +logger[metadataKey: "x"] = "y" is made, all underlying log handlers that this multiplex handler was initiated with +will observe this change.

+ +

Reading metadata from the multiplex log handler MAY need to pick one of conflicting values if the underlying log handlers +were already initiated with some metadata before passing them into the multiplex handler. The multiplex handler uses +the order in which the handlers were passed in during its initialization as a priority indicator - the first handler’s +values are more important than the next handlers values, etc.

+ +

Example: +If the multiplex log handler was initiated with two handlers like this: MultiplexLogHandler([handler1, handler2]). +The handlers each have some already set metadata: handler1 has metadata values for keys one and all, and handler2 +has values for keys two and all.

+ +

A query through the multiplex log handler the key one naturally returns handler1’s value, and a query for two +naturally returns handler2’s value. Querying for the key all will return handler1’s value, as that handler was indicated +“more important” than the second handler. The same rule applies when querying for the metadata property of the +multiplex log handler - it constructs Metadata uniquing values.

+ + +
+
+ +
+
+
+ +
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Structs/StreamLogHandler.html b/docs/1.4.2/Logging/Structs/StreamLogHandler.html new file mode 100644 index 0000000..59e04ce --- /dev/null +++ b/docs/1.4.2/Logging/Structs/StreamLogHandler.html @@ -0,0 +1,322 @@ + + + + StreamLogHandler Structure Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

StreamLogHandler

+
+
+ +
public struct StreamLogHandler : LogHandler
+ +
+
+

StreamLogHandler is a simple implementation of LogHandler for directing +Logger output to either stderr or stdout via the factory methods.

+ + +
+
+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Factory that makes a StreamLogHandler to directs its output to stdout

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func standardOutput(label: String) -> StreamLogHandler
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + standardError(label:) + +
    +
    +
    +
    +
    +
    +

    Factory that makes a StreamLogHandler to directs its output to stderr

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func standardError(label: String) -> StreamLogHandler
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + logLevel + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var logLevel: Logger.Level
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + metadata + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var metadata: Logger.Metadata { get set }
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public subscript(metadataKey metadataKey: String) -> Logger.Metadata.Value? { get set }
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func log(level: Logger.Level,
    +                message: Logger.Message,
    +                metadata: Logger.Metadata?,
    +                source: String,
    +                file: String,
    +                function: String,
    +                line: UInt)
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/Structs/SwiftLogNoOpLogHandler.html b/docs/1.4.2/Logging/Structs/SwiftLogNoOpLogHandler.html new file mode 100644 index 0000000..214d214 --- /dev/null +++ b/docs/1.4.2/Logging/Structs/SwiftLogNoOpLogHandler.html @@ -0,0 +1,320 @@ + + + + SwiftLogNoOpLogHandler Structure Reference + + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

SwiftLogNoOpLogHandler

+
+
+ +
public struct SwiftLogNoOpLogHandler : LogHandler
+ +
+
+

No operation LogHandler, used when no logging is required

+ + +
+
+ +
+
+
+
    +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init()
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_: String)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @available(*, deprecated, renamed: "log(level:message:metadata:source:file:function:line:﹚")
    +@inlinable
    +public func log(level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata?, file: String, function: String, line: UInt)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public subscript(metadataKey _: String) -> Logger.Metadata.Value? { get set }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + metadata + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public var metadata: Logger.Metadata { get set }
    + +
    +
    + +
    +
    +
  • +
  • +
    + + + + logLevel + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public var logLevel: Logger.Level { get set }
    + +
    +
    + +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/1.4.2/Logging/badge.svg b/docs/1.4.2/Logging/badge.svg new file mode 100644 index 0000000..b5adf50 --- /dev/null +++ b/docs/1.4.2/Logging/badge.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + documentation + + + documentation + + + 81% + + + 81% + + + diff --git a/docs/1.4.2/Logging/css/highlight.css b/docs/1.4.2/Logging/css/highlight.css new file mode 100644 index 0000000..c170357 --- /dev/null +++ b/docs/1.4.2/Logging/css/highlight.css @@ -0,0 +1,202 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight .c { + color: #999988; + font-style: italic; } + +.highlight .err { + color: #a61717; + background-color: #e3d2d2; } + +.highlight .k { + color: #000000; + font-weight: bold; } + +.highlight .o { + color: #000000; + font-weight: bold; } + +.highlight .cm { + color: #999988; + font-style: italic; } + +.highlight .cp { + color: #999999; + font-weight: bold; } + +.highlight .c1 { + color: #999988; + font-style: italic; } + +.highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + +.highlight .gd { + color: #000000; + background-color: #ffdddd; } + +.highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + +.highlight .ge { + color: #000000; + font-style: italic; } + +.highlight .gr { + color: #aa0000; } + +.highlight .gh { + color: #999999; } + +.highlight .gi { + color: #000000; + background-color: #ddffdd; } + +.highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + +.highlight .go { + color: #888888; } + +.highlight .gp { + color: #555555; } + +.highlight .gs { + font-weight: bold; } + +.highlight .gu { + color: #aaaaaa; } + +.highlight .gt { + color: #aa0000; } + +.highlight .kc { + color: #000000; + font-weight: bold; } + +.highlight .kd { + color: #000000; + font-weight: bold; } + +.highlight .kp { + color: #000000; + font-weight: bold; } + +.highlight .kr { + color: #000000; + font-weight: bold; } + +.highlight .kt { + color: #445588; } + +.highlight .m { + color: #009999; } + +.highlight .s { + color: #d14; } + +.highlight .na { + color: #008080; } + +.highlight .nb { + color: #0086B3; } + +.highlight .nc { + color: #445588; + font-weight: bold; } + +.highlight .no { + color: #008080; } + +.highlight .ni { + color: #800080; } + +.highlight .ne { + color: #990000; + font-weight: bold; } + +.highlight .nf { + color: #990000; } + +.highlight .nn { + color: #555555; } + +.highlight .nt { + color: #000080; } + +.highlight .nv { + color: #008080; } + +.highlight .ow { + color: #000000; + font-weight: bold; } + +.highlight .w { + color: #bbbbbb; } + +.highlight .mf { + color: #009999; } + +.highlight .mh { + color: #009999; } + +.highlight .mi { + color: #009999; } + +.highlight .mo { + color: #009999; } + +.highlight .sb { + color: #d14; } + +.highlight .sc { + color: #d14; } + +.highlight .sd { + color: #d14; } + +.highlight .s2 { + color: #d14; } + +.highlight .se { + color: #d14; } + +.highlight .sh { + color: #d14; } + +.highlight .si { + color: #d14; } + +.highlight .sx { + color: #d14; } + +.highlight .sr { + color: #009926; } + +.highlight .s1 { + color: #d14; } + +.highlight .ss { + color: #990073; } + +.highlight .bp { + color: #999999; } + +.highlight .vc { + color: #008080; } + +.highlight .vg { + color: #008080; } + +.highlight .vi { + color: #008080; } + +.highlight .il { + color: #009999; } diff --git a/docs/1.4.2/Logging/css/jazzy.css b/docs/1.4.2/Logging/css/jazzy.css new file mode 100644 index 0000000..c7bb9fe --- /dev/null +++ b/docs/1.4.2/Logging/css/jazzy.css @@ -0,0 +1,404 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ +*, *:before, *:after { + box-sizing: inherit; } + +body { + margin: 0; + background: #fff; + color: #333; + font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; + letter-spacing: .2px; + -webkit-font-smoothing: antialiased; + box-sizing: border-box; } + +h1 { + font-size: 2rem; + font-weight: 700; + margin: 1.275em 0 0.6em; } + +h2 { + font-size: 1.75rem; + font-weight: 700; + margin: 1.275em 0 0.3em; } + +h3 { + font-size: 1.5rem; + font-weight: 700; + margin: 1em 0 0.3em; } + +h4 { + font-size: 1.25rem; + font-weight: 700; + margin: 1.275em 0 0.85em; } + +h5 { + font-size: 1rem; + font-weight: 700; + margin: 1.275em 0 0.85em; } + +h6 { + font-size: 1rem; + font-weight: 700; + margin: 1.275em 0 0.85em; + color: #777; } + +p { + margin: 0 0 1em; } + +ul, ol { + padding: 0 0 0 2em; + margin: 0 0 0.85em; } + +blockquote { + margin: 0 0 0.85em; + padding: 0 15px; + color: #858585; + border-left: 4px solid #e5e5e5; } + +img { + max-width: 100%; } + +a { + color: #4183c4; + text-decoration: none; } + a:hover, a:focus { + outline: 0; + text-decoration: underline; } + a.discouraged { + text-decoration: line-through; } + a.discouraged:hover, a.discouraged:focus { + text-decoration: underline line-through; } + +table { + background: #fff; + width: 100%; + border-collapse: collapse; + border-spacing: 0; + overflow: auto; + margin: 0 0 0.85em; } + +tr:nth-child(2n) { + background-color: #fbfbfb; } + +th, td { + padding: 6px 13px; + border: 1px solid #ddd; } + +hr { + height: 1px; + border: none; + background-color: #ddd; } + +pre { + margin: 0 0 1.275em; + padding: .85em 1em; + overflow: auto; + background: #f7f7f7; + font-size: .85em; + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } + +code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } + +.item-container p > code, .item-container li > code, .top-matter p > code, .top-matter li > code { + background: #f7f7f7; + padding: .2em; } + .item-container p > code:before, .item-container p > code:after, .item-container li > code:before, .item-container li > code:after, .top-matter p > code:before, .top-matter p > code:after, .top-matter li > code:before, .top-matter li > code:after { + letter-spacing: -.2em; + content: "\00a0"; } + +pre code { + padding: 0; + white-space: pre; } + +.content-wrapper { + display: flex; + flex-direction: column; } + @media (min-width: 768px) { + .content-wrapper { + flex-direction: row; } } +.header { + display: flex; + padding: 8px; + font-size: 0.875em; + background: #444; + color: #999; } + +.header-col { + margin: 0; + padding: 0 8px; } + +.header-col--primary { + flex: 1; } + +.header-link { + color: #fff; } + +.header-icon { + padding-right: 2px; + vertical-align: -3px; + height: 16px; } + +.breadcrumbs { + font-size: 0.875em; + padding: 8px 16px; + margin: 0; + background: #fbfbfb; + border-bottom: 1px solid #ddd; } + +.carat { + height: 10px; + margin: 0 5px; } + +.navigation { + order: 2; } + @media (min-width: 768px) { + .navigation { + order: 1; + width: 25%; + max-width: 300px; + padding-bottom: 64px; + overflow: hidden; + word-wrap: normal; + background: #fbfbfb; + border-right: 1px solid #ddd; } } +.nav-groups { + list-style-type: none; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #ddd; + padding: 8px 0 8px 16px; } + +.nav-group-name-link { + color: #333; } + +.nav-group-tasks { + margin: 8px 0; + padding: 0 0 0 8px; } + +.nav-group-task { + font-size: 1em; + list-style-type: none; + white-space: nowrap; } + +.nav-group-task-link { + color: #808080; } + +.main-content { + order: 1; } + @media (min-width: 768px) { + .main-content { + order: 2; + flex: 1; + padding-bottom: 60px; } } +.section { + padding: 0 32px; + border-bottom: 1px solid #ddd; } + +.section-content { + max-width: 834px; + margin: 0 auto; + padding: 16px 0; } + +.section-name { + color: #666; + display: block; } + .section-name p { + margin-bottom: inherit; } + +.declaration .highlight { + overflow-x: initial; + padding: 8px 0; + margin: 0; + background-color: transparent; + border: none; } + +.task-group-section { + border-top: 1px solid #ddd; } + +.task-group { + padding-top: 0px; } + +.task-name-container a[name]:before { + content: ""; + display: block; } + +.section-name-container { + position: relative; } + .section-name-container .section-name-link { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + margin-bottom: 0; } + .section-name-container .section-name { + position: relative; + pointer-events: none; + z-index: 1; } + .section-name-container .section-name a { + pointer-events: auto; } + +.item-container { + padding: 0; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; } + .item .token, .item .direct-link { + display: inline-block; + text-indent: -20px; + padding-left: 3px; + margin-left: 20px; + font-size: 1rem; } + .item .declaration-note { + font-size: .85em; + color: #808080; + font-style: italic; } + +.pointer-container { + border-bottom: 1px solid #ddd; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + left: 21px; + top: 7px; + display: block; + position: absolute; + width: 12px; + height: 12px; + border-left: 1px solid #ddd; + border-top: 1px solid #ddd; + background: #fff; + transform: rotate(45deg); } + +.height-container { + display: none; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #fff; + border: 1px solid #ddd; + border-top-width: 0; + padding-top: 10px; + padding-bottom: 5px; + padding: 8px 16px; } + +.aside, .language { + padding: 6px 12px; + margin: 12px 0; + border-left: 5px solid #dddddd; + overflow-y: hidden; } + .aside .aside-title, .language .aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; + margin: 0; + color: #aaa; + -webkit-user-select: none; } + .aside p:last-child, .language p:last-child { + margin-bottom: 0; } + +.language { + border-left: 5px solid #cde9f4; } + .language .aside-title { + color: #4183c4; } + +.aside-warning, .aside-deprecated, .aside-unavailable { + border-left: 5px solid #ff6666; } + .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { + color: #ff0000; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #ddd; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +.footer { + padding: 8px 16px; + background: #444; + color: #ddd; + font-size: 0.8em; } + .footer p { + margin: 8px 0; } + .footer a { + color: #fff; } + +html.dash .header, html.dash .breadcrumbs, html.dash .navigation { + display: none; } + +html.dash .height-container { + display: block; } + +form[role=search] input { + font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 24px; + padding: 0 10px; + margin: 0; + border: none; + border-radius: 1em; } + .loading form[role=search] input { + background: white url(../img/spinner.gif) center right 4px no-repeat; } + +form[role=search] .tt-menu { + margin: 0; + min-width: 300px; + background: #fbfbfb; + color: #333; + border: 1px solid #ddd; } + +form[role=search] .tt-highlight { + font-weight: bold; } + +form[role=search] .tt-suggestion { + font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; + padding: 0 8px; } + form[role=search] .tt-suggestion span { + display: table-cell; + white-space: nowrap; } + form[role=search] .tt-suggestion .doc-parent-name { + width: 100%; + text-align: right; + font-weight: normal; + font-size: 0.9em; + padding-left: 16px; } + +form[role=search] .tt-suggestion:hover, +form[role=search] .tt-suggestion.tt-cursor { + cursor: pointer; + background-color: #4183c4; + color: #fff; } + +form[role=search] .tt-suggestion:hover .doc-parent-name, +form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { + color: #fff; } diff --git a/docs/1.4.2/Logging/img/carat.png b/docs/1.4.2/Logging/img/carat.png new file mode 100755 index 0000000000000000000000000000000000000000..29d2f7fd4955fca6bc6fb740e0373a2c358c398e GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRo!3HEV4DF?Wlw^r(L`iUdT1k0gQ7VIDN`6wR zf@f}GdTLN=VoGJ<$y6JlqAi{-jv*Ddl5#RKJQ5NTUZgiPI4RUKGIKU?u8L&ndhX1t za+0CMVUnT(Gnb}ei=c~x==tMH^F1_tBocXwcoSWoO-SZY-o>!8%^=Bms)(~h;m_U( zXNixk28L}0LS5-jKyq@#2gyS|J&f#pGCLkTc<@2s1dqeyqJ*Rc0tSIETAgmODY;(s z2y|Mcp&2}7rpBprBBB~1qM1`N+}4SoxYVPqsXi&l`rxZp{(w0iSy$Nv5*Vy!RapG^ S^0y4=eg;ohKbLh*2~7a!Pg}VF literal 0 HcmV?d00001 diff --git a/docs/1.4.2/Logging/img/dash.png b/docs/1.4.2/Logging/img/dash.png new file mode 100755 index 0000000000000000000000000000000000000000..6f694c7a012b417908da3687a0a39aa182e91c74 GIT binary patch literal 1338 zcmaJ>U2NM_6t){^r>#wcfL0VSTvuX@)$vd4#5N6WVkc|1rR}naMb)(7I5(};#!el# zbtCASsp?W-qE8zSJoFVdA%-T$WL8RI_B? zd+t5o`T5Q{p6=<|U$?VqCxRe#u}(PwSIl{LRKstfSbPYV7pzFiI$~t4QN;vEC}X4n z7RxDpAOV!j*w8ni4MAK3S~6v&;)g`l$axh<$7|>E5RD*h?RH*K2Y`j8L7%1v@%vZi za7@bt@uOUvisvQJuXPqpaHQCkREqd6M>0WG?6AwXR*T65ziuw$&~q$MS$o zfPyh>s<0l}mI@eh_hd(oB8*1tHZ@ojWl%QM;T+Jdm>k66jW?rZ#Atx!qns4-g&E4v z(=;FQ%W^avW?3J{L@2IeV>_(Ca)Lk1vm70uX*$9Rewm8!AxRF0BcZTNSFka?U@5u^ zDtpMY2lVtCmQm<8@|YxHuf`Qs(;a!QQ=g4=WngL}AQLr> z9JWrdsBIHKHXF!fSydodRsaOc@jgNkSU^x9kY&;UP<}3pZ{joC5f_Tevd>4eG~;)Y z=eZ~qp=5#aaUn*E3OES^BApKTU&mCAU>iEyt^S9?)&v0^j*SWDqjRZr20>6rTPSJ& zlzz0f);`}+^~w}lP1PK7Ew3f7ot#*uJ@>1Yo3J0TdsRKpA+*n9JnDXDrM~YvF`;uS|vAh|-QdmRf4AqG=`U z#v1n_Lxg8;&z#YCU2K`_W{-A zUf_|V)B9U(WZ~PP>)O(JZ|Vc-*qP&Q{c~BE~6izDPQq)#Nu*KOf(n^(VHY9;fiINM65``pc+9*v(mL$bwfCjbc%v9V{8r9iX|O%>Nr%pLD2qT{mty}c=LVleeamv znz3SOSm@kP8jThvOOq(56Yzh*fz(booe!uZij=BJC6+_lbvQ~B8nA2>kXdv_RDtRY z`5QXWWEySCe6vbTs^#f?J!WC*{1~RgVx!nJTJjQyO{dRANgx|FnymtGbD9%JmCh9^y)##j7{Dcqfn*1ta$rG89pJF6w-S7Z037$rr|y0;1Onp_ zGFJdT6Q!1C0AdVB0WOmpuV=AgAQ550Tn+-mivTtYPJmz*#75#_n9oV%!#rSOfmAfy zki%C~=fTp1{O#BLpJ|0jj#m6#|LRWit-vq3PE1z9ZqyvET4sX$-Icqy7t z<=aq5ff86AuBZBu6EjJsYWM0uejufWFTwPA7Su}0Bm$7KFb!q{Um_8~A{LUG#1l(l zSehUda@kU8LIRg9fkk2tZ;~ss5~R+mM<==F7hLHpxqLB>>PQS%Vc7b~?q!%T5+h8Q z4G=4Nzyi5WZ?^gkasJ{?Xhm`JC#WG6$1K2jb@=9&D3EgD#3UhGh#*21rJjulVXjCF zvp76q62jt0zzMG5C7DlfMgPl%C^3+~wf|}Lq=}jz|MmIcQjh1Ok6NjD$Em^Iv26D> z8tt_TnM9~^Tt8mflRGPOrrX|HtT3gG4LEuuk{g2Rn}QgJIa?gZo))!!=o_l9bvD%A zZ`aHajl8#~u?!4f7F#*b*->A=R2L)6!>saz?h>#wTXT-I(XmQ zx{84skS>k=i~i`(6k4C7;Zpfx%dCPVjPayMf8pugtGM=~s=Id1l#8MZJ1-73wV#Q3 zR3>v3%}jbQs1f_Z0xo;%=LILlA+nTpKI4ha%xWW}uqHrNao~&T4AY6m`P$_n-6h*g zhoX+e4n%~gl_lhe#s+AMb7d{5WzvYTa%6Q~si@@4{;s(0zU|H&P3fE+t{7X`S#Cj@ zC#vd}^4pcBD*77Ny5=j$h8EL2_t$O38$SQiJ6fPjJMimypr~MB2(&P0aI|h}$64<0 z>_~duqNjaT=DM^6+N{&B_lED;F2wrl?!4Lk*2((x!fmrcsw+=cI^qttuZ9C}-m~5E z-ryYVpL%^xR#&(0YI5hz<(}F7-p)?FPcyJO-zVO>%9ZDXJH8pnY;GJYFDQ>vd#j_* zRrd}L(r=!g+1#nQwsO?kpS`Qq8`NxE+Zy{gf7*_7J*U2V_|NpLo{iasj7VCg_V9&| ShohtYzipXxh2)4xTkMB!bsTr6|ge_{#vAVj^!DyNA-l zJ&$jDFNv;BTZXX@Qk-7+S5ErF>mkOcZ@lQv>F1VyCEMe2Ud@f<|L%#&QJi${E`2lR zqKFaW2Y$aTRxUY&ae$IHsN;Z;rdZ%CjYLTv!tMi234j-ON=CnvK-1QU|MG$YErn{gHZ@0Q6&?xSyply?S$EVNXH;gp?S5kV2-)$ga^gw`(f4Mm_Y(`RbgRkQTHF2@zL}dCiLk$RoZIc{xZL z_J*d5)Kb;#oKCFyfL*NGSs?y;e(QKvPJe1#G)h5*6E(?L9$nt?UaQJfP^$GDL0PU; z?r}C|);JQ4HES3w5VMlY7x6xfJAzDKlHE~>x;D`Fa=WygYot{pfFehH69o9pK|72W zwC6?t^AnATIJa=kewn=ep?Nk(aZ*pZo}51`S=^)jPRb`~l^VE}08>P3OJtQlXx1K8 z8Q}_u=F*fS;=k=?(fIv#+%811NTx8^}rHwvH%LbYmpFl9p1A{Idh@2x$ zuVp7)VD9}Uc(*(C**!QOdS(6B)$5^Tq5p3q*7un&_Z-NKEiEYg$D{Uq&sa>wj|za5 zJ6M~p)z+E6*X${8j6Ci+sqZ}zxeCAo0gZmZuhl+)Q%1U$Br_`NXcA-3yBdYMha+{o z{?q0Q(kaR2n`M29{!pwpgX6+CPQEgIO%x*0#!TC=c-ZPSkLO>OcmQUao5%-3w)U`F zRz?uGCEKQDh!TQPDmyd;iDX$TkMIe)%61q51Y2b-ie4r00!csilXgKL$txqj|6D(# z@(#!nQ}3R1JGeB3B5Tuqdvyg@*!-bq`9`pmasNGvy9^*+cd1Y*g>HK#rl7i79QQAG zl4SL_wW@WY1d+F?j0gFInGhsRrqvV3SKl{oqW+;9!fu|u@J)h4WM!0Cu02l@p60b#5M9c{dKh=_eRw~yl zWT0gw8RePzf%i8X&twiB|LF0bI@CYE{x1PI;Ylr4RJzU#Zc0j!c07g&q7=_eSd(sH z9VKChd?}^52IKcMqolAWiQH;HSp1Ploa$t zQhg|2sK;%Eb!By`)j9G1w?>`Wt6IK3gB}~uoue(MlRiIoZ#d{pgJZ8b{^{HO8)@%= zX)og3`*D5v1g;*Lz8@Sm(Q|&}PUytlb@Q_dzKFOzKK!Z_&?GO4+JO-)iPH=fs{(`& zZ9{oNn~LUZaeN!>i9p*0N^sHye8nw4xSi!REaP@@^Jy66|)Y9_AFoLlrlkg(42 zVq2J??I(+1*BcSKsTyO7LCho{8tVQm1b>*GQ*H~Mn71Lhy`alw%;D@CU^0)5Ng{cHz@LS7QZ o8uGHYt7)tmZjae5ge5$b`e_;HIklOseoIbqeod19BU-8d00{dbSpWb4 literal 0 HcmV?d00001 diff --git a/docs/1.4.2/Logging/index.html b/docs/1.4.2/Logging/index.html new file mode 100644 index 0000000..e05aefa --- /dev/null +++ b/docs/1.4.2/Logging/index.html @@ -0,0 +1,126 @@ + + + + Logging Reference + + + + + + + + + + + + + + + +
+

+ + Logging 1.4.2 Docs + + (81% documented) +

+ +
+
+ +
+
+ +

+ + GitHub + View on GitHub + +

+ +

+ + Dash + Install in Dash + +

+
+ + + +
+ +
+ +
+
+ +

SwiftLog Docs

+ +

SwiftLog is a Swift logging API package.

+ +

To get started with SwiftLog, import Logging. The +most important type is Logger +which you can use to emit log messages.

+ +
+
+ + +
+
+ + + diff --git a/docs/1.4.2/Logging/js/jazzy.js b/docs/1.4.2/Logging/js/jazzy.js new file mode 100755 index 0000000..1984416 --- /dev/null +++ b/docs/1.4.2/Logging/js/jazzy.js @@ -0,0 +1,74 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + +window.jazzy = {'docset': false} +if (typeof window.dash != 'undefined') { + document.documentElement.className += ' dash' + window.jazzy.docset = true +} +if (navigator.userAgent.match(/xcode/i)) { + document.documentElement.className += ' xcode' + window.jazzy.docset = true +} + +function toggleItem($link, $content) { + var animationDuration = 300; + $link.toggleClass('token-open'); + $content.slideToggle(animationDuration); +} + +function itemLinkToContent($link) { + return $link.parent().parent().next(); +} + +// On doc load + hash-change, open any targetted item +function openCurrentItemIfClosed() { + if (window.jazzy.docset) { + return; + } + var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); + $content = itemLinkToContent($link); + if ($content.is(':hidden')) { + toggleItem($link, $content); + } +} + +$(openCurrentItemIfClosed); +$(window).on('hashchange', openCurrentItemIfClosed); + +// On item link ('token') click, toggle its discussion +$('.token').on('click', function(event) { + if (window.jazzy.docset) { + return; + } + var $link = $(this); + toggleItem($link, itemLinkToContent($link)); + + // Keeps the document from jumping to the hash. + var href = $link.attr('href'); + if (history.pushState) { + history.pushState({}, '', href); + } else { + location.hash = href; + } + event.preventDefault(); +}); + +// Clicks on links to the current, closed, item need to open the item +$("a:not('.token')").on('click', function() { + if (location == this.href) { + openCurrentItemIfClosed(); + } +}); + +// KaTeX rendering +if ("katex" in window) { + $($('.math').each( (_, element) => { + katex.render(element.textContent, element, { + displayMode: $(element).hasClass('m-block'), + throwOnError: false, + trust: true + }); + })) +} diff --git a/docs/1.4.2/Logging/js/jazzy.search.js b/docs/1.4.2/Logging/js/jazzy.search.js new file mode 100644 index 0000000..359cdbb --- /dev/null +++ b/docs/1.4.2/Logging/js/jazzy.search.js @@ -0,0 +1,74 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + +$(function(){ + var $typeahead = $('[data-typeahead]'); + var $form = $typeahead.parents('form'); + var searchURL = $form.attr('action'); + + function displayTemplate(result) { + return result.name; + } + + function suggestionTemplate(result) { + var t = '
'; + t += '' + result.name + ''; + if (result.parent_name) { + t += '' + result.parent_name + ''; + } + t += '
'; + return t; + } + + $typeahead.one('focus', function() { + $form.addClass('loading'); + + $.getJSON(searchURL).then(function(searchData) { + const searchIndex = lunr(function() { + this.ref('url'); + this.field('name'); + this.field('abstract'); + for (const [url, doc] of Object.entries(searchData)) { + this.add({url: url, name: doc.name, abstract: doc.abstract}); + } + }); + + $typeahead.typeahead( + { + highlight: true, + minLength: 3, + autoselect: true + }, + { + limit: 10, + display: displayTemplate, + templates: { suggestion: suggestionTemplate }, + source: function(query, sync) { + const lcSearch = query.toLowerCase(); + const results = searchIndex.query(function(q) { + q.term(lcSearch, { boost: 100 }); + q.term(lcSearch, { + boost: 10, + wildcard: lunr.Query.wildcard.TRAILING + }); + }).map(function(result) { + var doc = searchData[result.ref]; + doc.url = result.ref; + return doc; + }); + sync(results); + } + } + ); + $form.removeClass('loading'); + $typeahead.trigger('focus'); + }); + }); + + var baseURL = searchURL.slice(0, -"search.json".length); + + $typeahead.on('typeahead:select', function(e, result) { + window.location = baseURL + result.url; + }); +}); diff --git a/docs/1.4.2/Logging/js/jquery.min.js b/docs/1.4.2/Logging/js/jquery.min.js new file mode 100644 index 0000000..c4c6022 --- /dev/null +++ b/docs/1.4.2/Logging/js/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/docs/1.4.2/Logging/js/typeahead.jquery.js b/docs/1.4.2/Logging/js/typeahead.jquery.js new file mode 100644 index 0000000..3a2d2ab --- /dev/null +++ b/docs/1.4.2/Logging/js/typeahead.jquery.js @@ -0,0 +1,1694 @@ +/*! + * typeahead.js 1.3.1 + * https://github.com/corejavascript/typeahead.js + * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT + */ + + +(function(root, factory) { + if (typeof define === "function" && define.amd) { + define([ "jquery" ], function(a0) { + return factory(a0); + }); + } else if (typeof module === "object" && module.exports) { + module.exports = factory(require("jquery")); + } else { + factory(root["jQuery"]); + } +})(this, function($) { + var _ = function() { + "use strict"; + return { + isMsie: function() { + return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; + }, + isBlankString: function(str) { + return !str || /^\s*$/.test(str); + }, + escapeRegExChars: function(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + }, + isString: function(obj) { + return typeof obj === "string"; + }, + isNumber: function(obj) { + return typeof obj === "number"; + }, + isArray: $.isArray, + isFunction: $.isFunction, + isObject: $.isPlainObject, + isUndefined: function(obj) { + return typeof obj === "undefined"; + }, + isElement: function(obj) { + return !!(obj && obj.nodeType === 1); + }, + isJQuery: function(obj) { + return obj instanceof $; + }, + toStr: function toStr(s) { + return _.isUndefined(s) || s === null ? "" : s + ""; + }, + bind: $.proxy, + each: function(collection, cb) { + $.each(collection, reverseArgs); + function reverseArgs(index, value) { + return cb(value, index); + } + }, + map: $.map, + filter: $.grep, + every: function(obj, test) { + var result = true; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (!(result = test.call(null, val, key, obj))) { + return false; + } + }); + return !!result; + }, + some: function(obj, test) { + var result = false; + if (!obj) { + return result; + } + $.each(obj, function(key, val) { + if (result = test.call(null, val, key, obj)) { + return false; + } + }); + return !!result; + }, + mixin: $.extend, + identity: function(x) { + return x; + }, + clone: function(obj) { + return $.extend(true, {}, obj); + }, + getIdGenerator: function() { + var counter = 0; + return function() { + return counter++; + }; + }, + templatify: function templatify(obj) { + return $.isFunction(obj) ? obj : template; + function template() { + return String(obj); + } + }, + defer: function(fn) { + setTimeout(fn, 0); + }, + debounce: function(func, wait, immediate) { + var timeout, result; + return function() { + var context = this, args = arguments, later, callNow; + later = function() { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + } + }; + callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) { + result = func.apply(context, args); + } + return result; + }; + }, + throttle: function(func, wait) { + var context, args, timeout, result, previous, later; + previous = 0; + later = function() { + previous = new Date(); + timeout = null; + result = func.apply(context, args); + }; + return function() { + var now = new Date(), remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + } else if (!timeout) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }, + stringify: function(val) { + return _.isString(val) ? val : JSON.stringify(val); + }, + guid: function() { + function _p8(s) { + var p = (Math.random().toString(16) + "000000000").substr(2, 8); + return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; + } + return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); + }, + noop: function() {} + }; + }(); + var WWW = function() { + "use strict"; + var defaultClassNames = { + wrapper: "twitter-typeahead", + input: "tt-input", + hint: "tt-hint", + menu: "tt-menu", + dataset: "tt-dataset", + suggestion: "tt-suggestion", + selectable: "tt-selectable", + empty: "tt-empty", + open: "tt-open", + cursor: "tt-cursor", + highlight: "tt-highlight" + }; + return build; + function build(o) { + var www, classes; + classes = _.mixin({}, defaultClassNames, o); + www = { + css: buildCss(), + classes: classes, + html: buildHtml(classes), + selectors: buildSelectors(classes) + }; + return { + css: www.css, + html: www.html, + classes: www.classes, + selectors: www.selectors, + mixin: function(o) { + _.mixin(o, www); + } + }; + } + function buildHtml(c) { + return { + wrapper: '', + menu: '
' + }; + } + function buildSelectors(classes) { + var selectors = {}; + _.each(classes, function(v, k) { + selectors[k] = "." + v; + }); + return selectors; + } + function buildCss() { + var css = { + wrapper: { + position: "relative", + display: "inline-block" + }, + hint: { + position: "absolute", + top: "0", + left: "0", + borderColor: "transparent", + boxShadow: "none", + opacity: "1" + }, + input: { + position: "relative", + verticalAlign: "top", + backgroundColor: "transparent" + }, + inputWithNoHint: { + position: "relative", + verticalAlign: "top" + }, + menu: { + position: "absolute", + top: "100%", + left: "0", + zIndex: "100", + display: "none" + }, + ltr: { + left: "0", + right: "auto" + }, + rtl: { + left: "auto", + right: " 0" + } + }; + if (_.isMsie()) { + _.mixin(css.input, { + backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" + }); + } + return css; + } + }(); + var EventBus = function() { + "use strict"; + var namespace, deprecationMap; + namespace = "typeahead:"; + deprecationMap = { + render: "rendered", + cursorchange: "cursorchanged", + select: "selected", + autocomplete: "autocompleted" + }; + function EventBus(o) { + if (!o || !o.el) { + $.error("EventBus initialized without el"); + } + this.$el = $(o.el); + } + _.mixin(EventBus.prototype, { + _trigger: function(type, args) { + var $e = $.Event(namespace + type); + this.$el.trigger.call(this.$el, $e, args || []); + return $e; + }, + before: function(type) { + var args, $e; + args = [].slice.call(arguments, 1); + $e = this._trigger("before" + type, args); + return $e.isDefaultPrevented(); + }, + trigger: function(type) { + var deprecatedType; + this._trigger(type, [].slice.call(arguments, 1)); + if (deprecatedType = deprecationMap[type]) { + this._trigger(deprecatedType, [].slice.call(arguments, 1)); + } + } + }); + return EventBus; + }(); + var EventEmitter = function() { + "use strict"; + var splitter = /\s+/, nextTick = getNextTick(); + return { + onSync: onSync, + onAsync: onAsync, + off: off, + trigger: trigger + }; + function on(method, types, cb, context) { + var type; + if (!cb) { + return this; + } + types = types.split(splitter); + cb = context ? bindContext(cb, context) : cb; + this._callbacks = this._callbacks || {}; + while (type = types.shift()) { + this._callbacks[type] = this._callbacks[type] || { + sync: [], + async: [] + }; + this._callbacks[type][method].push(cb); + } + return this; + } + function onAsync(types, cb, context) { + return on.call(this, "async", types, cb, context); + } + function onSync(types, cb, context) { + return on.call(this, "sync", types, cb, context); + } + function off(types) { + var type; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + while (type = types.shift()) { + delete this._callbacks[type]; + } + return this; + } + function trigger(types) { + var type, callbacks, args, syncFlush, asyncFlush; + if (!this._callbacks) { + return this; + } + types = types.split(splitter); + args = [].slice.call(arguments, 1); + while ((type = types.shift()) && (callbacks = this._callbacks[type])) { + syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); + asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); + syncFlush() && nextTick(asyncFlush); + } + return this; + } + function getFlush(callbacks, context, args) { + return flush; + function flush() { + var cancelled; + for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { + cancelled = callbacks[i].apply(context, args) === false; + } + return !cancelled; + } + } + function getNextTick() { + var nextTickFn; + if (window.setImmediate) { + nextTickFn = function nextTickSetImmediate(fn) { + setImmediate(function() { + fn(); + }); + }; + } else { + nextTickFn = function nextTickSetTimeout(fn) { + setTimeout(function() { + fn(); + }, 0); + }; + } + return nextTickFn; + } + function bindContext(fn, context) { + return fn.bind ? fn.bind(context) : function() { + fn.apply(context, [].slice.call(arguments, 0)); + }; + } + }(); + var highlight = function(doc) { + "use strict"; + var defaults = { + node: null, + pattern: null, + tagName: "strong", + className: null, + wordsOnly: false, + caseSensitive: false, + diacriticInsensitive: false + }; + var accented = { + A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", + B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", + C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", + D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", + E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", + F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", + G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", + H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", + I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", + J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", + K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", + L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", + M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", + N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", + O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", + P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", + Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", + R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", + S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", + T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", + U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", + V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", + W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", + X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", + Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", + Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" + }; + return function hightlight(o) { + var regex; + o = _.mixin({}, defaults, o); + if (!o.node || !o.pattern) { + return; + } + o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; + regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); + traverse(o.node, hightlightTextNode); + function hightlightTextNode(textNode) { + var match, patternNode, wrapperNode; + if (match = regex.exec(textNode.data)) { + wrapperNode = doc.createElement(o.tagName); + o.className && (wrapperNode.className = o.className); + patternNode = textNode.splitText(match.index); + patternNode.splitText(match[0].length); + wrapperNode.appendChild(patternNode.cloneNode(true)); + textNode.parentNode.replaceChild(wrapperNode, patternNode); + } + return !!match; + } + function traverse(el, hightlightTextNode) { + var childNode, TEXT_NODE_TYPE = 3; + for (var i = 0; i < el.childNodes.length; i++) { + childNode = el.childNodes[i]; + if (childNode.nodeType === TEXT_NODE_TYPE) { + i += hightlightTextNode(childNode) ? 1 : 0; + } else { + traverse(childNode, hightlightTextNode); + } + } + } + }; + function accent_replacer(chr) { + return accented[chr.toUpperCase()] || chr; + } + function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { + var escapedPatterns = [], regexStr; + for (var i = 0, len = patterns.length; i < len; i++) { + var escapedWord = _.escapeRegExChars(patterns[i]); + if (diacriticInsensitive) { + escapedWord = escapedWord.replace(/\S/g, accent_replacer); + } + escapedPatterns.push(escapedWord); + } + regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; + return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); + } + }(window.document); + var Input = function() { + "use strict"; + var specialKeyCodeMap; + specialKeyCodeMap = { + 9: "tab", + 27: "esc", + 37: "left", + 39: "right", + 13: "enter", + 38: "up", + 40: "down" + }; + function Input(o, www) { + var id; + o = o || {}; + if (!o.input) { + $.error("input is missing"); + } + www.mixin(this); + this.$hint = $(o.hint); + this.$input = $(o.input); + this.$menu = $(o.menu); + id = this.$input.attr("id") || _.guid(); + this.$menu.attr("id", id + "_listbox"); + this.$hint.attr({ + "aria-hidden": true + }); + this.$input.attr({ + "aria-owns": id + "_listbox", + role: "combobox", + "aria-autocomplete": "list", + "aria-expanded": false + }); + this.query = this.$input.val(); + this.queryWhenFocused = this.hasFocus() ? this.query : null; + this.$overflowHelper = buildOverflowHelper(this.$input); + this._checkLanguageDirection(); + if (this.$hint.length === 0) { + this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; + } + this.onSync("cursorchange", this._updateDescendent); + } + Input.normalizeQuery = function(str) { + return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); + }; + _.mixin(Input.prototype, EventEmitter, { + _onBlur: function onBlur() { + this.resetInputValue(); + this.trigger("blurred"); + }, + _onFocus: function onFocus() { + this.queryWhenFocused = this.query; + this.trigger("focused"); + }, + _onKeydown: function onKeydown($e) { + var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; + this._managePreventDefault(keyName, $e); + if (keyName && this._shouldTrigger(keyName, $e)) { + this.trigger(keyName + "Keyed", $e); + } + }, + _onInput: function onInput() { + this._setQuery(this.getInputValue()); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + _managePreventDefault: function managePreventDefault(keyName, $e) { + var preventDefault; + switch (keyName) { + case "up": + case "down": + preventDefault = !withModifier($e); + break; + + default: + preventDefault = false; + } + preventDefault && $e.preventDefault(); + }, + _shouldTrigger: function shouldTrigger(keyName, $e) { + var trigger; + switch (keyName) { + case "tab": + trigger = !withModifier($e); + break; + + default: + trigger = true; + } + return trigger; + }, + _checkLanguageDirection: function checkLanguageDirection() { + var dir = (this.$input.css("direction") || "ltr").toLowerCase(); + if (this.dir !== dir) { + this.dir = dir; + this.$hint.attr("dir", dir); + this.trigger("langDirChanged", dir); + } + }, + _setQuery: function setQuery(val, silent) { + var areEquivalent, hasDifferentWhitespace; + areEquivalent = areQueriesEquivalent(val, this.query); + hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; + this.query = val; + if (!silent && !areEquivalent) { + this.trigger("queryChanged", this.query); + } else if (!silent && hasDifferentWhitespace) { + this.trigger("whitespaceChanged", this.query); + } + }, + _updateDescendent: function updateDescendent(event, id) { + this.$input.attr("aria-activedescendant", id); + }, + bind: function() { + var that = this, onBlur, onFocus, onKeydown, onInput; + onBlur = _.bind(this._onBlur, this); + onFocus = _.bind(this._onFocus, this); + onKeydown = _.bind(this._onKeydown, this); + onInput = _.bind(this._onInput, this); + this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); + if (!_.isMsie() || _.isMsie() > 9) { + this.$input.on("input.tt", onInput); + } else { + this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { + if (specialKeyCodeMap[$e.which || $e.keyCode]) { + return; + } + _.defer(_.bind(that._onInput, that, $e)); + }); + } + return this; + }, + focus: function focus() { + this.$input.focus(); + }, + blur: function blur() { + this.$input.blur(); + }, + getLangDir: function getLangDir() { + return this.dir; + }, + getQuery: function getQuery() { + return this.query || ""; + }, + setQuery: function setQuery(val, silent) { + this.setInputValue(val); + this._setQuery(val, silent); + }, + hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { + return this.query !== this.queryWhenFocused; + }, + getInputValue: function getInputValue() { + return this.$input.val(); + }, + setInputValue: function setInputValue(value) { + this.$input.val(value); + this.clearHintIfInvalid(); + this._checkLanguageDirection(); + }, + resetInputValue: function resetInputValue() { + this.setInputValue(this.query); + }, + getHint: function getHint() { + return this.$hint.val(); + }, + setHint: function setHint(value) { + this.$hint.val(value); + }, + clearHint: function clearHint() { + this.setHint(""); + }, + clearHintIfInvalid: function clearHintIfInvalid() { + var val, hint, valIsPrefixOfHint, isValid; + val = this.getInputValue(); + hint = this.getHint(); + valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; + isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); + !isValid && this.clearHint(); + }, + hasFocus: function hasFocus() { + return this.$input.is(":focus"); + }, + hasOverflow: function hasOverflow() { + var constraint = this.$input.width() - 2; + this.$overflowHelper.text(this.getInputValue()); + return this.$overflowHelper.width() >= constraint; + }, + isCursorAtEnd: function() { + var valueLength, selectionStart, range; + valueLength = this.$input.val().length; + selectionStart = this.$input[0].selectionStart; + if (_.isNumber(selectionStart)) { + return selectionStart === valueLength; + } else if (document.selection) { + range = document.selection.createRange(); + range.moveStart("character", -valueLength); + return valueLength === range.text.length; + } + return true; + }, + destroy: function destroy() { + this.$hint.off(".tt"); + this.$input.off(".tt"); + this.$overflowHelper.remove(); + this.$hint = this.$input = this.$overflowHelper = $("
"); + }, + setAriaExpanded: function setAriaExpanded(value) { + this.$input.attr("aria-expanded", value); + } + }); + return Input; + function buildOverflowHelper($input) { + return $('').css({ + position: "absolute", + visibility: "hidden", + whiteSpace: "pre", + fontFamily: $input.css("font-family"), + fontSize: $input.css("font-size"), + fontStyle: $input.css("font-style"), + fontVariant: $input.css("font-variant"), + fontWeight: $input.css("font-weight"), + wordSpacing: $input.css("word-spacing"), + letterSpacing: $input.css("letter-spacing"), + textIndent: $input.css("text-indent"), + textRendering: $input.css("text-rendering"), + textTransform: $input.css("text-transform") + }).insertAfter($input); + } + function areQueriesEquivalent(a, b) { + return Input.normalizeQuery(a) === Input.normalizeQuery(b); + } + function withModifier($e) { + return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; + } + }(); + var Dataset = function() { + "use strict"; + var keys, nameGenerator; + keys = { + dataset: "tt-selectable-dataset", + val: "tt-selectable-display", + obj: "tt-selectable-object" + }; + nameGenerator = _.getIdGenerator(); + function Dataset(o, www) { + o = o || {}; + o.templates = o.templates || {}; + o.templates.notFound = o.templates.notFound || o.templates.empty; + if (!o.source) { + $.error("missing source"); + } + if (!o.node) { + $.error("missing node"); + } + if (o.name && !isValidName(o.name)) { + $.error("invalid dataset name: " + o.name); + } + www.mixin(this); + this.highlight = !!o.highlight; + this.name = _.toStr(o.name || nameGenerator()); + this.limit = o.limit || 5; + this.displayFn = getDisplayFn(o.display || o.displayKey); + this.templates = getTemplates(o.templates, this.displayFn); + this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; + this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; + this._resetLastSuggestion(); + this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); + } + Dataset.extractData = function extractData(el) { + var $el = $(el); + if ($el.data(keys.obj)) { + return { + dataset: $el.data(keys.dataset) || "", + val: $el.data(keys.val) || "", + obj: $el.data(keys.obj) || null + }; + } + return null; + }; + _.mixin(Dataset.prototype, EventEmitter, { + _overwrite: function overwrite(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (this.async && this.templates.pending) { + this._renderPending(query); + } else if (!this.async && this.templates.notFound) { + this._renderNotFound(query); + } else { + this._empty(); + } + this.trigger("rendered", suggestions, false, this.name); + }, + _append: function append(query, suggestions) { + suggestions = suggestions || []; + if (suggestions.length && this.$lastSuggestion.length) { + this._appendSuggestions(query, suggestions); + } else if (suggestions.length) { + this._renderSuggestions(query, suggestions); + } else if (!this.$lastSuggestion.length && this.templates.notFound) { + this._renderNotFound(query); + } + this.trigger("rendered", suggestions, true, this.name); + }, + _renderSuggestions: function renderSuggestions(query, suggestions) { + var $fragment; + $fragment = this._getSuggestionsFragment(query, suggestions); + this.$lastSuggestion = $fragment.children().last(); + this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); + }, + _appendSuggestions: function appendSuggestions(query, suggestions) { + var $fragment, $lastSuggestion; + $fragment = this._getSuggestionsFragment(query, suggestions); + $lastSuggestion = $fragment.children().last(); + this.$lastSuggestion.after($fragment); + this.$lastSuggestion = $lastSuggestion; + }, + _renderPending: function renderPending(query) { + var template = this.templates.pending; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _renderNotFound: function renderNotFound(query) { + var template = this.templates.notFound; + this._resetLastSuggestion(); + template && this.$el.html(template({ + query: query, + dataset: this.name + })); + }, + _empty: function empty() { + this.$el.empty(); + this._resetLastSuggestion(); + }, + _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { + var that = this, fragment; + fragment = document.createDocumentFragment(); + _.each(suggestions, function getSuggestionNode(suggestion) { + var $el, context; + context = that._injectQuery(query, suggestion); + $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); + fragment.appendChild($el[0]); + }); + this.highlight && highlight({ + className: this.classes.highlight, + node: fragment, + pattern: query + }); + return $(fragment); + }, + _getFooter: function getFooter(query, suggestions) { + return this.templates.footer ? this.templates.footer({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _getHeader: function getHeader(query, suggestions) { + return this.templates.header ? this.templates.header({ + query: query, + suggestions: suggestions, + dataset: this.name + }) : null; + }, + _resetLastSuggestion: function resetLastSuggestion() { + this.$lastSuggestion = $(); + }, + _injectQuery: function injectQuery(query, obj) { + return _.isObject(obj) ? _.mixin({ + _query: query + }, obj) : obj; + }, + update: function update(query) { + var that = this, canceled = false, syncCalled = false, rendered = 0; + this.cancel(); + this.cancel = function cancel() { + canceled = true; + that.cancel = $.noop; + that.async && that.trigger("asyncCanceled", query, that.name); + }; + this.source(query, sync, async); + !syncCalled && sync([]); + function sync(suggestions) { + if (syncCalled) { + return; + } + syncCalled = true; + suggestions = (suggestions || []).slice(0, that.limit); + rendered = suggestions.length; + that._overwrite(query, suggestions); + if (rendered < that.limit && that.async) { + that.trigger("asyncRequested", query, that.name); + } + } + function async(suggestions) { + suggestions = suggestions || []; + if (!canceled && rendered < that.limit) { + that.cancel = $.noop; + var idx = Math.abs(rendered - that.limit); + rendered += idx; + that._append(query, suggestions.slice(0, idx)); + that.async && that.trigger("asyncReceived", query, that.name); + } + } + }, + cancel: $.noop, + clear: function clear() { + this._empty(); + this.cancel(); + this.trigger("cleared"); + }, + isEmpty: function isEmpty() { + return this.$el.is(":empty"); + }, + destroy: function destroy() { + this.$el = $("
"); + } + }); + return Dataset; + function getDisplayFn(display) { + display = display || _.stringify; + return _.isFunction(display) ? display : displayFn; + function displayFn(obj) { + return obj[display]; + } + } + function getTemplates(templates, displayFn) { + return { + notFound: templates.notFound && _.templatify(templates.notFound), + pending: templates.pending && _.templatify(templates.pending), + header: templates.header && _.templatify(templates.header), + footer: templates.footer && _.templatify(templates.footer), + suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate + }; + function userSuggestionTemplate(context) { + var template = templates.suggestion; + return $(template(context)).attr("id", _.guid()); + } + function suggestionTemplate(context) { + return $('
').attr("id", _.guid()).text(displayFn(context)); + } + } + function isValidName(str) { + return /^[_a-zA-Z0-9-]+$/.test(str); + } + }(); + var Menu = function() { + "use strict"; + function Menu(o, www) { + var that = this; + o = o || {}; + if (!o.node) { + $.error("node is required"); + } + www.mixin(this); + this.$node = $(o.node); + this.query = null; + this.datasets = _.map(o.datasets, initializeDataset); + function initializeDataset(oDataset) { + var node = that.$node.find(oDataset.node).first(); + oDataset.node = node.length ? node : $("
").appendTo(that.$node); + return new Dataset(oDataset, www); + } + } + _.mixin(Menu.prototype, EventEmitter, { + _onSelectableClick: function onSelectableClick($e) { + this.trigger("selectableClicked", $($e.currentTarget)); + }, + _onRendered: function onRendered(type, dataset, suggestions, async) { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetRendered", dataset, suggestions, async); + }, + _onCleared: function onCleared() { + this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); + this.trigger("datasetCleared"); + }, + _propagate: function propagate() { + this.trigger.apply(this, arguments); + }, + _allDatasetsEmpty: function allDatasetsEmpty() { + return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { + var isEmpty = dataset.isEmpty(); + this.$node.attr("aria-expanded", !isEmpty); + return isEmpty; + }, this)); + }, + _getSelectables: function getSelectables() { + return this.$node.find(this.selectors.selectable); + }, + _removeCursor: function _removeCursor() { + var $selectable = this.getActiveSelectable(); + $selectable && $selectable.removeClass(this.classes.cursor); + }, + _ensureVisible: function ensureVisible($el) { + var elTop, elBottom, nodeScrollTop, nodeHeight; + elTop = $el.position().top; + elBottom = elTop + $el.outerHeight(true); + nodeScrollTop = this.$node.scrollTop(); + nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); + if (elTop < 0) { + this.$node.scrollTop(nodeScrollTop + elTop); + } else if (nodeHeight < elBottom) { + this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); + } + }, + bind: function() { + var that = this, onSelectableClick; + onSelectableClick = _.bind(this._onSelectableClick, this); + this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); + this.$node.on("mouseover", this.selectors.selectable, function() { + that.setCursor($(this)); + }); + this.$node.on("mouseleave", function() { + that._removeCursor(); + }); + _.each(this.datasets, function(dataset) { + dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); + }); + return this; + }, + isOpen: function isOpen() { + return this.$node.hasClass(this.classes.open); + }, + open: function open() { + this.$node.scrollTop(0); + this.$node.addClass(this.classes.open); + }, + close: function close() { + this.$node.attr("aria-expanded", false); + this.$node.removeClass(this.classes.open); + this._removeCursor(); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.attr("dir", dir); + }, + selectableRelativeToCursor: function selectableRelativeToCursor(delta) { + var $selectables, $oldCursor, oldIndex, newIndex; + $oldCursor = this.getActiveSelectable(); + $selectables = this._getSelectables(); + oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; + newIndex = oldIndex + delta; + newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; + newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; + return newIndex === -1 ? null : $selectables.eq(newIndex); + }, + setCursor: function setCursor($selectable) { + this._removeCursor(); + if ($selectable = $selectable && $selectable.first()) { + $selectable.addClass(this.classes.cursor); + this._ensureVisible($selectable); + } + }, + getSelectableData: function getSelectableData($el) { + return $el && $el.length ? Dataset.extractData($el) : null; + }, + getActiveSelectable: function getActiveSelectable() { + var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); + return $selectable.length ? $selectable : null; + }, + getTopSelectable: function getTopSelectable() { + var $selectable = this._getSelectables().first(); + return $selectable.length ? $selectable : null; + }, + update: function update(query) { + var isValidUpdate = query !== this.query; + if (isValidUpdate) { + this.query = query; + _.each(this.datasets, updateDataset); + } + return isValidUpdate; + function updateDataset(dataset) { + dataset.update(query); + } + }, + empty: function empty() { + _.each(this.datasets, clearDataset); + this.query = null; + this.$node.addClass(this.classes.empty); + function clearDataset(dataset) { + dataset.clear(); + } + }, + destroy: function destroy() { + this.$node.off(".tt"); + this.$node = $("
"); + _.each(this.datasets, destroyDataset); + function destroyDataset(dataset) { + dataset.destroy(); + } + } + }); + return Menu; + }(); + var Status = function() { + "use strict"; + function Status(options) { + this.$el = $("", { + role: "status", + "aria-live": "polite" + }).css({ + position: "absolute", + padding: "0", + border: "0", + height: "1px", + width: "1px", + "margin-bottom": "-1px", + "margin-right": "-1px", + overflow: "hidden", + clip: "rect(0 0 0 0)", + "white-space": "nowrap" + }); + options.$input.after(this.$el); + _.each(options.menu.datasets, _.bind(function(dataset) { + if (dataset.onSync) { + dataset.onSync("rendered", _.bind(this.update, this)); + dataset.onSync("cleared", _.bind(this.cleared, this)); + } + }, this)); + } + _.mixin(Status.prototype, { + update: function update(event, suggestions) { + var length = suggestions.length; + var words; + if (length === 1) { + words = { + result: "result", + is: "is" + }; + } else { + words = { + result: "results", + is: "are" + }; + } + this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); + }, + cleared: function() { + this.$el.text(""); + } + }); + return Status; + }(); + var DefaultMenu = function() { + "use strict"; + var s = Menu.prototype; + function DefaultMenu() { + Menu.apply(this, [].slice.call(arguments, 0)); + } + _.mixin(DefaultMenu.prototype, Menu.prototype, { + open: function open() { + !this._allDatasetsEmpty() && this._show(); + return s.open.apply(this, [].slice.call(arguments, 0)); + }, + close: function close() { + this._hide(); + return s.close.apply(this, [].slice.call(arguments, 0)); + }, + _onRendered: function onRendered() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onRendered.apply(this, [].slice.call(arguments, 0)); + }, + _onCleared: function onCleared() { + if (this._allDatasetsEmpty()) { + this._hide(); + } else { + this.isOpen() && this._show(); + } + return s._onCleared.apply(this, [].slice.call(arguments, 0)); + }, + setLanguageDirection: function setLanguageDirection(dir) { + this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); + return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); + }, + _hide: function hide() { + this.$node.hide(); + }, + _show: function show() { + this.$node.css("display", "block"); + } + }); + return DefaultMenu; + }(); + var Typeahead = function() { + "use strict"; + function Typeahead(o, www) { + var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; + o = o || {}; + if (!o.input) { + $.error("missing input"); + } + if (!o.menu) { + $.error("missing menu"); + } + if (!o.eventBus) { + $.error("missing event bus"); + } + www.mixin(this); + this.eventBus = o.eventBus; + this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; + this.input = o.input; + this.menu = o.menu; + this.enabled = true; + this.autoselect = !!o.autoselect; + this.active = false; + this.input.hasFocus() && this.activate(); + this.dir = this.input.getLangDir(); + this._hacks(); + this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); + onFocused = c(this, "activate", "open", "_onFocused"); + onBlurred = c(this, "deactivate", "_onBlurred"); + onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); + onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); + onEscKeyed = c(this, "isActive", "_onEscKeyed"); + onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); + onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); + onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); + onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); + onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); + onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); + this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); + } + _.mixin(Typeahead.prototype, { + _hacks: function hacks() { + var $input, $menu; + $input = this.input.$input || $("
"); + $menu = this.menu.$node || $("
"); + $input.on("blur.tt", function($e) { + var active, isActive, hasActive; + active = document.activeElement; + isActive = $menu.is(active); + hasActive = $menu.has(active).length > 0; + if (_.isMsie() && (isActive || hasActive)) { + $e.preventDefault(); + $e.stopImmediatePropagation(); + _.defer(function() { + $input.focus(); + }); + } + }); + $menu.on("mousedown.tt", function($e) { + $e.preventDefault(); + }); + }, + _onSelectableClicked: function onSelectableClicked(type, $el) { + this.select($el); + }, + _onDatasetCleared: function onDatasetCleared() { + this._updateHint(); + }, + _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { + this._updateHint(); + if (this.autoselect) { + var cursorClass = this.selectors.cursor.substr(1); + this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); + } + this.eventBus.trigger("render", suggestions, async, dataset); + }, + _onAsyncRequested: function onAsyncRequested(type, dataset, query) { + this.eventBus.trigger("asyncrequest", query, dataset); + }, + _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { + this.eventBus.trigger("asynccancel", query, dataset); + }, + _onAsyncReceived: function onAsyncReceived(type, dataset, query) { + this.eventBus.trigger("asyncreceive", query, dataset); + }, + _onFocused: function onFocused() { + this._minLengthMet() && this.menu.update(this.input.getQuery()); + }, + _onBlurred: function onBlurred() { + if (this.input.hasQueryChangedSinceLastFocus()) { + this.eventBus.trigger("change", this.input.getQuery()); + } + }, + _onEnterKeyed: function onEnterKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + if (this.select($selectable)) { + $e.preventDefault(); + $e.stopPropagation(); + } + } else if (this.autoselect) { + if (this.select(this.menu.getTopSelectable())) { + $e.preventDefault(); + $e.stopPropagation(); + } + } + }, + _onTabKeyed: function onTabKeyed(type, $e) { + var $selectable; + if ($selectable = this.menu.getActiveSelectable()) { + this.select($selectable) && $e.preventDefault(); + } else if (this.autoselect) { + if ($selectable = this.menu.getTopSelectable()) { + this.autocomplete($selectable) && $e.preventDefault(); + } + } + }, + _onEscKeyed: function onEscKeyed() { + this.close(); + }, + _onUpKeyed: function onUpKeyed() { + this.moveCursor(-1); + }, + _onDownKeyed: function onDownKeyed() { + this.moveCursor(+1); + }, + _onLeftKeyed: function onLeftKeyed() { + if (this.dir === "rtl" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onRightKeyed: function onRightKeyed() { + if (this.dir === "ltr" && this.input.isCursorAtEnd()) { + this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); + } + }, + _onQueryChanged: function onQueryChanged(e, query) { + this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); + }, + _onWhitespaceChanged: function onWhitespaceChanged() { + this._updateHint(); + }, + _onLangDirChanged: function onLangDirChanged(e, dir) { + if (this.dir !== dir) { + this.dir = dir; + this.menu.setLanguageDirection(dir); + } + }, + _openIfActive: function openIfActive() { + this.isActive() && this.open(); + }, + _minLengthMet: function minLengthMet(query) { + query = _.isString(query) ? query : this.input.getQuery() || ""; + return query.length >= this.minLength; + }, + _updateHint: function updateHint() { + var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; + $selectable = this.menu.getTopSelectable(); + data = this.menu.getSelectableData($selectable); + val = this.input.getInputValue(); + if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { + query = Input.normalizeQuery(val); + escapedQuery = _.escapeRegExChars(query); + frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); + match = frontMatchRegEx.exec(data.val); + match && this.input.setHint(val + match[1]); + } else { + this.input.clearHint(); + } + }, + isEnabled: function isEnabled() { + return this.enabled; + }, + enable: function enable() { + this.enabled = true; + }, + disable: function disable() { + this.enabled = false; + }, + isActive: function isActive() { + return this.active; + }, + activate: function activate() { + if (this.isActive()) { + return true; + } else if (!this.isEnabled() || this.eventBus.before("active")) { + return false; + } else { + this.active = true; + this.eventBus.trigger("active"); + return true; + } + }, + deactivate: function deactivate() { + if (!this.isActive()) { + return true; + } else if (this.eventBus.before("idle")) { + return false; + } else { + this.active = false; + this.close(); + this.eventBus.trigger("idle"); + return true; + } + }, + isOpen: function isOpen() { + return this.menu.isOpen(); + }, + open: function open() { + if (!this.isOpen() && !this.eventBus.before("open")) { + this.input.setAriaExpanded(true); + this.menu.open(); + this._updateHint(); + this.eventBus.trigger("open"); + } + return this.isOpen(); + }, + close: function close() { + if (this.isOpen() && !this.eventBus.before("close")) { + this.input.setAriaExpanded(false); + this.menu.close(); + this.input.clearHint(); + this.input.resetInputValue(); + this.eventBus.trigger("close"); + } + return !this.isOpen(); + }, + setVal: function setVal(val) { + this.input.setQuery(_.toStr(val)); + }, + getVal: function getVal() { + return this.input.getQuery(); + }, + select: function select($selectable) { + var data = this.menu.getSelectableData($selectable); + if (data && !this.eventBus.before("select", data.obj, data.dataset)) { + this.input.setQuery(data.val, true); + this.eventBus.trigger("select", data.obj, data.dataset); + this.close(); + return true; + } + return false; + }, + autocomplete: function autocomplete($selectable) { + var query, data, isValid; + query = this.input.getQuery(); + data = this.menu.getSelectableData($selectable); + isValid = data && query !== data.val; + if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { + this.input.setQuery(data.val); + this.eventBus.trigger("autocomplete", data.obj, data.dataset); + return true; + } + return false; + }, + moveCursor: function moveCursor(delta) { + var query, $candidate, data, suggestion, datasetName, cancelMove, id; + query = this.input.getQuery(); + $candidate = this.menu.selectableRelativeToCursor(delta); + data = this.menu.getSelectableData($candidate); + suggestion = data ? data.obj : null; + datasetName = data ? data.dataset : null; + id = $candidate ? $candidate.attr("id") : null; + this.input.trigger("cursorchange", id); + cancelMove = this._minLengthMet() && this.menu.update(query); + if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { + this.menu.setCursor($candidate); + if (data) { + if (typeof data.val === "string") { + this.input.setInputValue(data.val); + } + } else { + this.input.resetInputValue(); + this._updateHint(); + } + this.eventBus.trigger("cursorchange", suggestion, datasetName); + return true; + } + return false; + }, + destroy: function destroy() { + this.input.destroy(); + this.menu.destroy(); + } + }); + return Typeahead; + function c(ctx) { + var methods = [].slice.call(arguments, 1); + return function() { + var args = [].slice.call(arguments); + _.each(methods, function(method) { + return ctx[method].apply(ctx, args); + }); + }; + } + }(); + (function() { + "use strict"; + var old, keys, methods; + old = $.fn.typeahead; + keys = { + www: "tt-www", + attrs: "tt-attrs", + typeahead: "tt-typeahead" + }; + methods = { + initialize: function initialize(o, datasets) { + var www; + datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); + o = o || {}; + www = WWW(o.classNames); + return this.each(attach); + function attach() { + var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; + _.each(datasets, function(d) { + d.highlight = !!o.highlight; + }); + $input = $(this); + $wrapper = $(www.html.wrapper); + $hint = $elOrNull(o.hint); + $menu = $elOrNull(o.menu); + defaultHint = o.hint !== false && !$hint; + defaultMenu = o.menu !== false && !$menu; + defaultHint && ($hint = buildHintFromInput($input, www)); + defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); + $hint && $hint.val(""); + $input = prepInput($input, www); + if (defaultHint || defaultMenu) { + $wrapper.css(www.css.wrapper); + $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); + $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); + } + MenuConstructor = defaultMenu ? DefaultMenu : Menu; + eventBus = new EventBus({ + el: $input + }); + input = new Input({ + hint: $hint, + input: $input, + menu: $menu + }, www); + menu = new MenuConstructor({ + node: $menu, + datasets: datasets + }, www); + status = new Status({ + $input: $input, + menu: menu + }); + typeahead = new Typeahead({ + input: input, + menu: menu, + eventBus: eventBus, + minLength: o.minLength, + autoselect: o.autoselect + }, www); + $input.data(keys.www, www); + $input.data(keys.typeahead, typeahead); + } + }, + isEnabled: function isEnabled() { + var enabled; + ttEach(this.first(), function(t) { + enabled = t.isEnabled(); + }); + return enabled; + }, + enable: function enable() { + ttEach(this, function(t) { + t.enable(); + }); + return this; + }, + disable: function disable() { + ttEach(this, function(t) { + t.disable(); + }); + return this; + }, + isActive: function isActive() { + var active; + ttEach(this.first(), function(t) { + active = t.isActive(); + }); + return active; + }, + activate: function activate() { + ttEach(this, function(t) { + t.activate(); + }); + return this; + }, + deactivate: function deactivate() { + ttEach(this, function(t) { + t.deactivate(); + }); + return this; + }, + isOpen: function isOpen() { + var open; + ttEach(this.first(), function(t) { + open = t.isOpen(); + }); + return open; + }, + open: function open() { + ttEach(this, function(t) { + t.open(); + }); + return this; + }, + close: function close() { + ttEach(this, function(t) { + t.close(); + }); + return this; + }, + select: function select(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.select($el); + }); + return success; + }, + autocomplete: function autocomplete(el) { + var success = false, $el = $(el); + ttEach(this.first(), function(t) { + success = t.autocomplete($el); + }); + return success; + }, + moveCursor: function moveCursoe(delta) { + var success = false; + ttEach(this.first(), function(t) { + success = t.moveCursor(delta); + }); + return success; + }, + val: function val(newVal) { + var query; + if (!arguments.length) { + ttEach(this.first(), function(t) { + query = t.getVal(); + }); + return query; + } else { + ttEach(this, function(t) { + t.setVal(_.toStr(newVal)); + }); + return this; + } + }, + destroy: function destroy() { + ttEach(this, function(typeahead, $input) { + revert($input); + typeahead.destroy(); + }); + return this; + } + }; + $.fn.typeahead = function(method) { + if (methods[method]) { + return methods[method].apply(this, [].slice.call(arguments, 1)); + } else { + return methods.initialize.apply(this, arguments); + } + }; + $.fn.typeahead.noConflict = function noConflict() { + $.fn.typeahead = old; + return this; + }; + function ttEach($els, fn) { + $els.each(function() { + var $input = $(this), typeahead; + (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); + }); + } + function buildHintFromInput($input, www) { + return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ + readonly: true, + required: false + }).removeAttr("id name placeholder").removeClass("required").attr({ + spellcheck: "false", + tabindex: -1 + }); + } + function prepInput($input, www) { + $input.data(keys.attrs, { + dir: $input.attr("dir"), + autocomplete: $input.attr("autocomplete"), + spellcheck: $input.attr("spellcheck"), + style: $input.attr("style") + }); + $input.addClass(www.classes.input).attr({ + spellcheck: false + }); + try { + !$input.attr("dir") && $input.attr("dir", "auto"); + } catch (e) {} + return $input; + } + function getBackgroundStyles($el) { + return { + backgroundAttachment: $el.css("background-attachment"), + backgroundClip: $el.css("background-clip"), + backgroundColor: $el.css("background-color"), + backgroundImage: $el.css("background-image"), + backgroundOrigin: $el.css("background-origin"), + backgroundPosition: $el.css("background-position"), + backgroundRepeat: $el.css("background-repeat"), + backgroundSize: $el.css("background-size") + }; + } + function revert($input) { + var www, $wrapper; + www = $input.data(keys.www); + $wrapper = $input.parent().filter(www.selectors.wrapper); + _.each($input.data(keys.attrs), function(val, key) { + _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); + }); + $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); + if ($wrapper.length) { + $input.detach().insertAfter($wrapper); + $wrapper.remove(); + } + } + function $elOrNull(obj) { + var isValid, $el; + isValid = _.isJQuery(obj) || _.isElement(obj); + $el = isValid ? $(obj).first() : []; + return $el.length ? $el : null; + } + })(); +}); \ No newline at end of file diff --git a/docs/1.4.2/Logging/search.json b/docs/1.4.2/Logging/search.json new file mode 100644 index 0000000..5307965 --- /dev/null +++ b/docs/1.4.2/Logging/search.json @@ -0,0 +1 @@ +{"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging012SwiftLogNoOpC7HandlerVACycfc":{"name":"init()","abstract":"

Undocumented

","parent_name":"SwiftLogNoOpLogHandler"},"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging012SwiftLogNoOpC7HandlerVyACSScfc":{"name":"init(_:)","abstract":"

Undocumented

","parent_name":"SwiftLogNoOpLogHandler"},"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata4file8function4lineyAA6LoggerV5LevelO_AL7MessageVSDySSAL13MetadataValueOGSgS2SSutF":{"name":"log(level:message:metadata:file:function:line:)","parent_name":"SwiftLogNoOpLogHandler"},"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","parent_name":"SwiftLogNoOpLogHandler"},"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","parent_name":"SwiftLogNoOpLogHandler"},"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","parent_name":"SwiftLogNoOpLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging16StreamLogHandlerV14standardOutput5labelACSS_tFZ":{"name":"standardOutput(label:)","abstract":"

Factory that makes a StreamLogHandler to directs its output to stdout

","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging16StreamLogHandlerV13standardError5labelACSS_tFZ":{"name":"standardError(label:)","abstract":"

Factory that makes a StreamLogHandler to directs its output to stderr

","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata6source4file8function4lineyAA6LoggerV5LevelO_AM7MessageVSDySSAM13MetadataValueOGSgS3SSutF":{"name":"log(level:message:metadata:source:file:function:line:)","parent_name":"StreamLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging19MultiplexLogHandlerVyACSayAA0cD0_pGcfc":{"name":"init(_:)","abstract":"

Create a MultiplexLogHandler.

","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata6source4file8function4lineyAA6LoggerV5LevelO_AM7MessageVSDySSAM13MetadataValueOGSgS3SSutF":{"name":"log(level:message:metadata:source:file:function:line:)","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","parent_name":"MultiplexLogHandler"},"Structs/Logger/Message.html#/s:s26ExpressibleByStringLiteralP0cD4TypeQa":{"name":"StringLiteralType","parent_name":"Message"},"Structs/Logger/Message.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"Message"},"Structs/Logger/Message.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"Message"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO5traceyA2EmF":{"name":"trace","abstract":"

Appropriate for messages that contain information normally of use only when","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO5debugyA2EmF":{"name":"debug","abstract":"

Appropriate for messages that contain information normally of use only when","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO4infoyA2EmF":{"name":"info","abstract":"

Appropriate for informational messages.

","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO6noticeyA2EmF":{"name":"notice","abstract":"

Appropriate for conditions that are not error conditions, but that may require","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO7warningyA2EmF":{"name":"warning","abstract":"

Appropriate for messages that are not error conditions, but more severe than","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO5erroryA2EmF":{"name":"error","abstract":"

Appropriate for error conditions.

","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO8criticalyA2EmF":{"name":"critical","abstract":"

Appropriate for critical error conditions that usually require immediate","parent_name":"Level"},"Structs/Logger/Level.html#/s:SL1loiySbx_xtFZ":{"name":"<(_:_:)","parent_name":"Level"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO6stringyAESScAEmF":{"name":"string(_:)","abstract":"

A metadata value which is a String.

","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO17stringConvertibleyAEs012CustomStringF0_pcAEmF":{"name":"stringConvertible(_:)","abstract":"

A metadata value which is some CustomStringConvertible.

","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO10dictionaryyAESDySSAEGcAEmF":{"name":"dictionary(_:)","abstract":"

A metadata value which is a dictionary from String to Logger.MetadataValue.

","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO5arrayyAESayAEGcAEmF":{"name":"array(_:)","abstract":"

A metadata value which is an array of Logger.MetadataValues.

","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s26ExpressibleByStringLiteralP0cD4TypeQa":{"name":"StringLiteralType","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s30ExpressibleByDictionaryLiteralP3KeyQa":{"name":"Key","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s30ExpressibleByDictionaryLiteralP5ValueQa":{"name":"Value","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s30ExpressibleByDictionaryLiteralP010dictionaryD0x3KeyQz_5ValueQztd_tcfc":{"name":"init(dictionaryLiteral:)","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s25ExpressibleByArrayLiteralP0cD7ElementQa":{"name":"ArrayLiteralElement","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s25ExpressibleByArrayLiteralP05arrayD0x0cD7ElementQzd_tcfc":{"name":"init(arrayLiteral:)","parent_name":"MetadataValue"},"Structs/Logger.html#/s:7Logging6LoggerV5labelSSvp":{"name":"label","abstract":"

An identifier of the creator of this Logger.

","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV3log5level_8metadata6source4file8function4lineyAC5LevelO_AC7MessageVyXKSDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"log(level:_:metadata:source:file:function:line:)","abstract":"

Log a message passing the log level as a parameter.

","parent_name":"Logger"},"Structs/Logger.html#/log(level:_:metadata:source:file:function:line:)":{"name":"log(level:_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV3log5level_8metadata4file8function4lineyAC5LevelO_AC7MessageVyXKSDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"log(level:_:metadata:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/log(level:_:metadata:file:function:line:)":{"name":"log(level:_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV11metadataKeyAC13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","abstract":"

Add, change, or remove a logging metadata item.

","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8logLevelAC0D0Ovp":{"name":"logLevel","abstract":"

Get or set the log level configured for this Logger.

","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5trace_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"trace(_:metadata:source:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/trace(_:metadata:source:file:function:line:)":{"name":"trace(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5trace_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"trace(_:metadata:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/trace(_:metadata:file:function:line:)":{"name":"trace(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5debug_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"debug(_:metadata:source:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/debug(_:metadata:source:file:function:line:)":{"name":"debug(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5debug_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"debug(_:metadata:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/debug(_:metadata:file:function:line:)":{"name":"debug(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV4info_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"info(_:metadata:source:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/info(_:metadata:source:file:function:line:)":{"name":"info(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV4info_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"info(_:metadata:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/info(_:metadata:file:function:line:)":{"name":"info(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV6notice_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"notice(_:metadata:source:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/notice(_:metadata:source:file:function:line:)":{"name":"notice(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV6notice_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"notice(_:metadata:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/notice(_:metadata:file:function:line:)":{"name":"notice(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV7warning_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"warning(_:metadata:source:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/warning(_:metadata:source:file:function:line:)":{"name":"warning(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV7warning_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"warning(_:metadata:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/warning(_:metadata:file:function:line:)":{"name":"warning(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5error_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"error(_:metadata:source:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/error(_:metadata:source:file:function:line:)":{"name":"error(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5error_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"error(_:metadata:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/error(_:metadata:file:function:line:)":{"name":"error(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8critical_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"critical(_:metadata:source:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/critical(_:metadata:source:file:function:line:)":{"name":"critical(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8critical_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"critical(_:metadata:file:function:line:)","abstract":"

Undocumented

","parent_name":"Logger"},"Structs/Logger.html#/critical(_:metadata:file:function:line:)":{"name":"critical(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8Metadataa":{"name":"Metadata","abstract":"

Metadata is a typealias for [String: Logger.MetadataValue] the type of the metadata storage.

","parent_name":"Logger"},"Structs/Logger/MetadataValue.html":{"name":"MetadataValue","abstract":"

A logging metadata value. Logger.MetadataValue is string, array, and dictionary literal convertible.

","parent_name":"Logger"},"Structs/Logger/Level.html":{"name":"Level","abstract":"

The log level.

","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5labelACSS_tcfc":{"name":"init(label:)","abstract":"

Construct a Logger given a label identifying the creator of the Logger.

","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5label7factoryACSS_AA10LogHandler_pSSXEtcfc":{"name":"init(label:factory:)","abstract":"

Construct a Logger given a label identifying the creator of the Logger or a non-standard LogHandler.

","parent_name":"Logger"},"Structs/Logger/Message.html":{"name":"Message","abstract":"

Logger.Message represents a log message’s text. It is usually created using string literals.

","parent_name":"Logger"},"Structs/Logger.html":{"name":"Logger","abstract":"

A Logger is the central type in SwiftLog. Its central function is to emit log messages using one of the methods"},"Structs/MultiplexLogHandler.html":{"name":"MultiplexLogHandler","abstract":"

A pseudo-LogHandler that can be used to send messages to multiple other LogHandlers.

"},"Structs/StreamLogHandler.html":{"name":"StreamLogHandler","abstract":"

StreamLogHandler is a simple implementation of LogHandler for directing"},"Structs/SwiftLogNoOpLogHandler.html":{"name":"SwiftLogNoOpLogHandler","abstract":"

No operation LogHandler, used when no logging is required

"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata6source4file8function4lineyAA6LoggerV5LevelO_AM7MessageVSDySSAM13MetadataValueOGSgS3SSutF":{"name":"log(level:message:metadata:source:file:function:line:)","abstract":"

This method is called when a LogHandler must emit a log message. There is no need for the LogHandler to","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata4file8function4lineyAA6LoggerV5LevelO_AL7MessageVSDySSAL13MetadataValueOGSgS2SSutF":{"name":"log(level:message:metadata:file:function:line:)","abstract":"

SwiftLog 1.0 compatibility method. Please do not implement, implement","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","abstract":"

Add, remove, or change the logging metadata.

","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","abstract":"

Get or set the entire metadata storage as a dictionary.

","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","abstract":"

Get or set the configured log level.

","parent_name":"LogHandler"},"Protocols/LogHandler.html":{"name":"LogHandler","abstract":"

A LogHandler is an implementation of a logging backend.

"},"Enums/LoggingSystem.html#/s:7Logging0A6SystemO9bootstrapyyAA10LogHandler_pSScFZ":{"name":"bootstrap(_:)","abstract":"

bootstrap is a one-time configuration function which globally selects the desired logging backend","parent_name":"LoggingSystem"},"Enums/LoggingSystem.html":{"name":"LoggingSystem","abstract":"

The LoggingSystem is a global facility where the default logging backend implementation (LogHandler) can be"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Protocols.html":{"name":"Protocols","abstract":"

The following protocols are available globally.

"},"Structs.html":{"name":"Structures","abstract":"

The following structures are available globally.

"}} \ No newline at end of file diff --git a/docs/1.4.2/Logging/undocumented.json b/docs/1.4.2/Logging/undocumented.json new file mode 100644 index 0000000..6ccb8d3 --- /dev/null +++ b/docs/1.4.2/Logging/undocumented.json @@ -0,0 +1,124 @@ +{ + "warnings": [ + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 121, + "symbol": "Logger.log(level:_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 190, + "symbol": "Logger.trace(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 221, + "symbol": "Logger.trace(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 256, + "symbol": "Logger.debug(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 288, + "symbol": "Logger.debug(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 323, + "symbol": "Logger.info(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 356, + "symbol": "Logger.info(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 391, + "symbol": "Logger.notice(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 428, + "symbol": "Logger.notice(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 462, + "symbol": "Logger.warning(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 495, + "symbol": "Logger.warning(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 530, + "symbol": "Logger.error(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 563, + "symbol": "Logger.error(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 597, + "symbol": "Logger.critical(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 633, + "symbol": "Logger.critical(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 1160, + "symbol": "SwiftLogNoOpLogHandler.init()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 1162, + "symbol": "SwiftLogNoOpLogHandler.init(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + } + ], + "source_directory": "/code" +} \ No newline at end of file diff --git a/docs/current/Logging/Enums.html b/docs/current/Logging/Enums.html index 39f2cb8..6527b28 100644 --- a/docs/current/Logging/Enums.html +++ b/docs/current/Logging/Enums.html @@ -21,27 +21,27 @@

- Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

-

+

-

+

- + GitHub View on GitHub

- - + + Dash Install in Dash

@@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ + @@ -139,7 +142,7 @@ implementation.

@@ -152,9 +155,8 @@ implementation.

-
diff --git a/docs/current/Logging/Enums/LoggingSystem.html b/docs/current/Logging/Enums/LoggingSystem.html index 551a23c..b7ac362 100644 --- a/docs/current/Logging/Enums/LoggingSystem.html +++ b/docs/current/Logging/Enums/LoggingSystem.html @@ -21,27 +21,27 @@

- Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

-

+

-

+

- + GitHub View on GitHub

- - + + Dash Install in Dash

@@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ + @@ -104,6 +107,7 @@

LoggingSystem

+
public enum LoggingSystem
@@ -112,6 +116,9 @@ configured. LoggingSystem is set up just once in a given program to set up the desired logging backend implementation.

+
@@ -124,7 +131,7 @@ implementation.

- bootstrap(_:) + bootstrap(_:)
@@ -134,7 +141,7 @@ implementation.

bootstrap is a one-time configuration function which globally selects the desired logging backend implementation. bootstrap can be called at maximum once in any given program, calling it more than once will -lead to undefined behaviour, most likely a crash.

+lead to undefined behavior, most likely a crash.

@@ -165,7 +172,7 @@ lead to undefined behaviour, most likely a crash.

@@ -178,9 +185,8 @@ lead to undefined behaviour, most likely a crash.

- diff --git a/docs/current/Logging/Protocols.html b/docs/current/Logging/Protocols.html index cd44d3e..1038c74 100644 --- a/docs/current/Logging/Protocols.html +++ b/docs/current/Logging/Protocols.html @@ -21,27 +21,27 @@

- Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

-

+

-

+

- + GitHub View on GitHub

- - + + Dash Install in Dash

@@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ + @@ -163,9 +166,11 @@ to be able to debug special failures in production. This special case is accepta solution specific to your LogHandler implementation to achieve that. Please find an example implementation of this behavior below, on reception of the signal you would call LogHandlerWithGlobalLogLevelOverride.overrideGlobalLogLevel = .debug, for example.

-
public struct LogHandlerWithGlobalLogLevelOverride: LogHandler {
+
import class Foundation.NSLock
+
+public struct LogHandlerWithGlobalLogLevelOverride: LogHandler {
     // the static properties hold the globally overridden log level (if overridden)
-    private static let overrideLock = Lock()
+    private static let overrideLock = NSLock()
     private static var overrideLogLevel: Logger.Level? = nil
 
     // this holds the log level if not overridden
@@ -181,9 +186,9 @@ behavior below, on reception of the signal you would call
     public var logLevel: Logger.Level {
         // when we get asked for the log level, we check if it was globally overridden or not
         get {
-            return LogHandlerWithGlobalLogLevelOverride.overrideLock.withLock {
-                return LogHandlerWithGlobalLogLevelOverride.overrideLogLevel
-            } ?? self._logLevel
+            LogHandlerWithGlobalLogLevelOverride.overrideLock.lock()
+            defer { LogHandlerWithGlobalLogLevelOverride.overrideLock.unlock() }
+            return LogHandlerWithGlobalLogLevelOverride.overrideLogLevel ?? self._logLevel
         }
         // we set the log level whenever we're asked (note: this might not have an effect if globally
         // overridden)
@@ -193,7 +198,7 @@ behavior below, on reception of the signal you would call
     }
 
     public func log(level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata?,
-             file: String, function: String, line: UInt) {
+                    source: String, file: String, function: String, line: UInt) {
         // [...]
     }
 
@@ -208,9 +213,9 @@ behavior below, on reception of the signal you would call
 
     // this is the function to globally override the log level, it is not part of the `LogHandler` protocol
     public static func overrideGlobalLogLevel(_ logLevel: Logger.Level) {
-        LogHandlerWithGlobalLogLevelOverride.overrideLock.withLock {
-            LogHandlerWithGlobalLogLevelOverride.overrideLogLevel = logLevel
-        }
+        LogHandlerWithGlobalLogLevelOverride.overrideLock.lock()
+        defer { LogHandlerWithGlobalLogLevelOverride.overrideLock.unlock() }
+        LogHandlerWithGlobalLogLevelOverride.overrideLogLevel = logLevel
     }
 }
 
@@ -230,7 +235,7 @@ level on one Logger should not af @@ -243,9 +248,8 @@ level on one Logger should not af - diff --git a/docs/current/Logging/Protocols/LogHandler.html b/docs/current/Logging/Protocols/LogHandler.html index e9a4d7a..28b051c 100644 --- a/docs/current/Logging/Protocols/LogHandler.html +++ b/docs/current/Logging/Protocols/LogHandler.html @@ -21,27 +21,27 @@

- Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

-

+

-

+

- + GitHub View on GitHub

- - + + Dash Install in Dash

@@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ + @@ -104,6 +107,7 @@

LogHandler

+
public protocol LogHandler
@@ -147,9 +151,11 @@ to be able to debug special failures in production. This special case is accepta solution specific to your LogHandler implementation to achieve that. Please find an example implementation of this behavior below, on reception of the signal you would call LogHandlerWithGlobalLogLevelOverride.overrideGlobalLogLevel = .debug, for example.

-
public struct LogHandlerWithGlobalLogLevelOverride: LogHandler {
+
import class Foundation.NSLock
+
+public struct LogHandlerWithGlobalLogLevelOverride: LogHandler {
     // the static properties hold the globally overridden log level (if overridden)
-    private static let overrideLock = Lock()
+    private static let overrideLock = NSLock()
     private static var overrideLogLevel: Logger.Level? = nil
 
     // this holds the log level if not overridden
@@ -165,9 +171,9 @@ behavior below, on reception of the signal you would call
     public var logLevel: Logger.Level {
         // when we get asked for the log level, we check if it was globally overridden or not
         get {
-            return LogHandlerWithGlobalLogLevelOverride.overrideLock.withLock {
-                return LogHandlerWithGlobalLogLevelOverride.overrideLogLevel
-            } ?? self._logLevel
+            LogHandlerWithGlobalLogLevelOverride.overrideLock.lock()
+            defer { LogHandlerWithGlobalLogLevelOverride.overrideLock.unlock() }
+            return LogHandlerWithGlobalLogLevelOverride.overrideLogLevel ?? self._logLevel
         }
         // we set the log level whenever we're asked (note: this might not have an effect if globally
         // overridden)
@@ -177,7 +183,7 @@ behavior below, on reception of the signal you would call
     }
 
     public func log(level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata?,
-             file: String, function: String, line: UInt) {
+                    source: String, file: String, function: String, line: UInt) {
         // [...]
     }
 
@@ -192,9 +198,9 @@ behavior below, on reception of the signal you would call
 
     // this is the function to globally override the log level, it is not part of the `LogHandler` protocol
     public static func overrideGlobalLogLevel(_ logLevel: Logger.Level) {
-        LogHandlerWithGlobalLogLevelOverride.overrideLock.withLock {
-            LogHandlerWithGlobalLogLevelOverride.overrideLogLevel = logLevel
-        }
+        LogHandlerWithGlobalLogLevelOverride.overrideLock.lock()
+        defer { LogHandlerWithGlobalLogLevelOverride.overrideLock.unlock() }
+        LogHandlerWithGlobalLogLevelOverride.overrideLogLevel = logLevel
     }
 }
 
@@ -203,6 +209,9 @@ behavior below, on reception of the signal you would call level has not been overridden. And most importantly it passes the requirement listed above: A change to the log level on one Logger should not affect the log level of another Logger variable.

+
@@ -213,10 +222,13 @@ level on one Logger should not
  • @@ -227,12 +239,22 @@ level on one Logger should not check if the level is above or below the configured logLevel as Logger already performed this check and determined that a message should be logged.

    +
    +

    Default Implementation

    +
    +

    Declaration

    Swift

    -
    func log(level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata?, file: String, function: String, line: UInt)
    +
    func log(level: Logger.Level,
    +         message: Logger.Message,
    +         metadata: Logger.Metadata?,
    +         source: String,
    +         file: String,
    +         function: String,
    +         line: UInt)
    @@ -276,6 +298,18 @@ determined that a message should be logged.

    + + + + source + + + +
    +

    The source where the log message originated, for example the logging module.

    +
    + + @@ -316,7 +350,46 @@ determined that a message should be logged.

    + + +
  • +
  • +
    + + + + log(level:message:metadata:file:function:line:) + + + Default implementation + +
    +
    +
    +
    +
    +
    +

    SwiftLog 1.0 compatibility method. Please do not implement, implement +log(level:message:metadata:source:file:function:line:) instead.

    + +
    +

    Default Implementation

    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @available(*, deprecated, renamed: "log(level:message:metadata:source:file:function:line:﹚")
    +func log(level: Logging.Logger.Level, message: Logging.Logger.Message, metadata: Logging.Logger.Metadata?, file: String, function: String, line: UInt)
    + +
    +
    +
    @@ -326,7 +399,7 @@ determined that a message should be logged.

    - subscript(metadataKey:) + subscript(metadataKey:)
    @@ -371,7 +444,7 @@ determined that a message should be logged.

    @@ -407,7 +480,7 @@ determined that a message should be logged.

    @@ -445,7 +518,7 @@ determined that a message should be logged.

    @@ -458,9 +531,8 @@ determined that a message should be logged.

    - diff --git a/docs/current/Logging/Structs.html b/docs/current/Logging/Structs.html index 3ed2ea9..60e0bde 100644 --- a/docs/current/Logging/Structs.html +++ b/docs/current/Logging/Structs.html @@ -21,27 +21,27 @@

    - Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

    -

    +

    -

    +

    - + GitHub View on GitHub

    - - + + Dash Install in Dash

    @@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ +
  • @@ -127,6 +130,10 @@

    A Logger is the central type in SwiftLog. Its central function is to emit log messages using one of the methods corresponding to a log level.

    +

    Loggers are value types with respect to the logLevel and the metadata (as well as the immutable label +and the selected LogHandler). Therefore, Loggers are suitable to be passed around between libraries if you want +to preserve metadata across libraries.

    +

    The most basic usage of a Logger is

    logger.info("Hello World!")
     
    @@ -142,7 +149,7 @@ corresponding to a log level.

    @@ -161,10 +168,48 @@ corresponding to a log level.

    A pseudo-LogHandler that can be used to send messages to multiple other LogHandlers.

    +

    Effective Logger.Level

    -

    The first LogHandler passed to the initialisation function of MultiplexLogHandler control the logLevel as -well as the metadata for this LogHandler. Any subsequent LogHandlers used to initialise a -MultiplexLogHandler are merely to emit the log message to another place.

    +

    When first initialized the multiplex log handlers’ log level is automatically set to the minimum of all the +passed in log handlers. This ensures that each of the handlers will be able to log at their appropriate level +any log events they might be interested in.

    + +

    Example: +If log handler A is logging at .debug level, and log handler B is logging at .info level, the constructed +MultiplexLogHandler([A, B])‘s effective log level will be set to .debug, meaning that debug messages will be +handled by this handler, while only logged by the underlying A log handler (since B’s log level is .info +and thus it would not actually log that log message).

    + +

    If the log level is set on a Logger backed by an MultiplexLogHandler the log level will apply to all +underlying log handlers, allowing a logger to still select at what level it wants to log regardless of if the underlying +handler is a multiplex or a normal one. If for some reason one might want to not allow changing a log level of a specific +handler passed into the multiplex log handler, this is possible by wrapping it in a handler which ignores any log level changes.

    +

    Effective Logger.Metadata

    + +

    Since a MultiplexLogHandler is a combination of multiple log handlers, the handling of metadata can be non-obvious. +For example, the underlying log handlers may have metadata of their own set before they are used to initialize the multiplex log handler.

    + +

    The multiplex log handler acts purely as proxy and does not make any changes to underlying handler metadata other than +proxying writes that users made on a Logger instance backed by this handler.

    + +

    Setting metadata is always proxied through to all underlying handlers, meaning that if a modification like +logger[metadataKey: "x"] = "y" is made, all underlying log handlers that this multiplex handler was initiated with +will observe this change.

    + +

    Reading metadata from the multiplex log handler MAY need to pick one of conflicting values if the underlying log handlers +were already initiated with some metadata before passing them into the multiplex handler. The multiplex handler uses +the order in which the handlers were passed in during its initialization as a priority indicator - the first handler’s +values are more important than the next handlers values, etc.

    + +

    Example: +If the multiplex log handler was initiated with two handlers like this: MultiplexLogHandler([handler1, handler2]). +The handlers each have some already set metadata: handler1 has metadata values for keys one and all, and handler2 +has values for keys two and all.

    + +

    A query through the multiplex log handler the key one naturally returns handler1’s value, and a query for two +naturally returns handler2’s value. Querying for the key all will return handler1’s value, as that handler was indicated +“more important” than the second handler. The same rule applies when querying for the metadata property of the +multiplex log handler - it constructs Metadata uniquing values.

    See more
    @@ -177,7 +222,7 @@ well as the metadata for this - Show on GitHub + Show on GitHub @@ -209,7 +254,38 @@ well as the metadata for this - Show on GitHub + Show on GitHub + + + + +
  • + +
    +
    +
    +
    +
    +

    No operation LogHandler, used when no logging is required

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct SwiftLogNoOpLogHandler : LogHandler
    + +
    +
    +
    @@ -222,9 +298,8 @@ well as the metadata for this -

    © 2020 SwiftLog team. All rights reserved. (Last updated: 2020-02-28)

    -

    Generated by jazzy ♪♫ v0.13.1, a Realm project.

    +

    © 2021 SwiftLog team. All rights reserved. (Last updated: 2021-12-17)

    +

    Generated by jazzy ♪♫ v0.14.1, a Realm project.

    - diff --git a/docs/current/Logging/Structs/Logger.html b/docs/current/Logging/Structs/Logger.html index ed92221..d1398b9 100644 --- a/docs/current/Logging/Structs/Logger.html +++ b/docs/current/Logging/Structs/Logger.html @@ -21,27 +21,27 @@

    - Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

    -

    +

    -

    +

    - + GitHub View on GitHub

    - - + + Dash Install in Dash

    @@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ +
  • @@ -104,6 +107,7 @@

    Logger

    +
    public struct Logger
    @@ -111,10 +115,17 @@

    A Logger is the central type in SwiftLog. Its central function is to emit log messages using one of the methods corresponding to a log level.

    +

    Loggers are value types with respect to the logLevel and the metadata (as well as the immutable label +and the selected LogHandler). Therefore, Loggers are suitable to be passed around between libraries if you want +to preserve metadata across libraries.

    +

    The most basic usage of a Logger is

    logger.info("Hello World!")
     
    +
    @@ -147,7 +158,7 @@ corresponding to a log level.

    @@ -155,9 +166,9 @@ corresponding to a log level.

  • @@ -179,7 +190,8 @@ otherwise nothing will happen.

    public func log(level: Logger.Level, _ message: @autoclosure () -> Logger.Message, metadata: @autoclosure () -> Logger.Metadata? = nil, - file: String = #file, function: String = #function, line: UInt = #line)
  • + source: @autoclosure () -> String? = nil, + file: String = #fileID, function: String = #function, line: UInt = #line) @@ -219,7 +231,22 @@ otherwise nothing will happen.

    -

    One-off metadata to attach to this log message

    +

    One-off metadata to attach to this log message.

    +
    + + + + + + source + + + +
    +

    The source this log messages originates from. Defaults + to the module emitting the log message (on Swift 5.3 or + newer and the folder name containing the log emitting file on Swift 5.2 or + older).

    @@ -232,7 +259,7 @@ otherwise nothing will happen.

    The file this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #file).

    + defaults to #fileID (on Swift 5.3 or newer and #file on Swift 5.2 or older).

    @@ -266,7 +293,77 @@ otherwise nothing will happen.

    + + + +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func log(level: Logger.Level,
    +                _ message: @autoclosure () -> Logger.Message,
    +                metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +
    @@ -276,7 +373,7 @@ otherwise nothing will happen.

    - subscript(metadataKey:) + subscript(metadataKey:)
    @@ -303,7 +400,7 @@ otherwise nothing will happen.

    @@ -325,7 +422,7 @@ otherwise nothing will happen.

    Note

    Loggers treat logLevel as a value. This means that a change in logLevel will only affect this - very Logger. It it acceptable for logging backends to have some form of global log level override + very Logger. It is acceptable for logging backends to have some form of global log level override that affects multiple or even all loggers. This means a change in logLevel to one Logger might in certain cases have no effect. @@ -342,7 +439,7 @@ otherwise nothing will happen.

    @@ -350,9 +447,9 @@ otherwise nothing will happen.

  • @@ -360,10 +457,7 @@ otherwise nothing will happen.

    -

    Log a message passing with the Logger.Level.trace log level.

    - -

    If .trace is at least as severe as the Logger‘s logLevel, it will be logged, -otherwise nothing will happen.

    +

    Undocumented

    @@ -373,82 +467,13 @@ otherwise nothing will happen.

    @inlinable
     public func trace(_ message: @autoclosure () -> Logger.Message,
                       metadata: @autoclosure () -> Logger.Metadata? = nil,
    -                  file: String = #file, function: String = #function, line: UInt = #line)
    + source: @autoclosure () -> String? = nil, + file: String = #fileID, function: String = #function, line: UInt = #line)
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - message - - -
    -

    The message to be logged. message can be used with any string interpolation literal.

    -
    -
    - - metadata - - -
    -

    One-off metadata to attach to this log message

    -
    -
    - - file - - -
    -

    The file this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #file).

    -
    -
    - - function - - -
    -

    The function this log message originates from (there’s usually no need to pass it explicitly as - it defaults to #function).

    -
    -
    - - line - - -
    -

    The line this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #line).

    -
    -
    -
    @@ -456,9 +481,9 @@ otherwise nothing will happen.

  • @@ -466,10 +491,76 @@ otherwise nothing will happen.

    -

    Log a message passing with the Logger.Level.debug log level.

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    -

    If .debug is at least as severe as the Logger‘s logLevel, it will be logged, -otherwise nothing will happen.

    +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func trace(_ message: @autoclosure () -> Logger.Message,
    +                  metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                  file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    @@ -479,82 +570,13 @@ otherwise nothing will happen.

    @inlinable
     public func debug(_ message: @autoclosure () -> Logger.Message,
                       metadata: @autoclosure () -> Logger.Metadata? = nil,
    -                  file: String = #file, function: String = #function, line: UInt = #line)
    + source: @autoclosure () -> String? = nil, + file: String = #fileID, function: String = #function, line: UInt = #line)
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - message - - -
    -

    The message to be logged. message can be used with any string interpolation literal.

    -
    -
    - - metadata - - -
    -

    One-off metadata to attach to this log message

    -
    -
    - - file - - -
    -

    The file this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #file).

    -
    -
    - - function - - -
    -

    The function this log message originates from (there’s usually no need to pass it explicitly as - it defaults to #function).

    -
    -
    - - line - - -
    -

    The line this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #line).

    -
    -
    -
    @@ -562,9 +584,9 @@ otherwise nothing will happen.

  • @@ -572,10 +594,76 @@ otherwise nothing will happen.

    -

    Log a message passing with the Logger.Level.info log level.

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    -

    If .info is at least as severe as the Logger‘s logLevel, it will be logged, -otherwise nothing will happen.

    +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func debug(_ message: @autoclosure () -> Logger.Message,
    +                  metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                  file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    @@ -585,82 +673,13 @@ otherwise nothing will happen.

    @inlinable
     public func info(_ message: @autoclosure () -> Logger.Message,
                      metadata: @autoclosure () -> Logger.Metadata? = nil,
    -                 file: String = #file, function: String = #function, line: UInt = #line)
    + source: @autoclosure () -> String? = nil, + file: String = #fileID, function: String = #function, line: UInt = #line)
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - message - - -
    -

    The message to be logged. message can be used with any string interpolation literal.

    -
    -
    - - metadata - - -
    -

    One-off metadata to attach to this log message

    -
    -
    - - file - - -
    -

    The file this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #file).

    -
    -
    - - function - - -
    -

    The function this log message originates from (there’s usually no need to pass it explicitly as - it defaults to #function).

    -
    -
    - - line - - -
    -

    The line this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #line).

    -
    -
    -
    @@ -668,9 +687,9 @@ otherwise nothing will happen.

  • @@ -678,10 +697,76 @@ otherwise nothing will happen.

    -

    Log a message passing with the Logger.Level.notice log level.

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    -

    If .notice is at least as severe as the Logger‘s logLevel, it will be logged, -otherwise nothing will happen.

    +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func info(_ message: @autoclosure () -> Logger.Message,
    +                 metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                 file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    @@ -691,82 +776,13 @@ otherwise nothing will happen.

    @inlinable
     public func notice(_ message: @autoclosure () -> Logger.Message,
                        metadata: @autoclosure () -> Logger.Metadata? = nil,
    -                   file: String = #file, function: String = #function, line: UInt = #line)
    + source: @autoclosure () -> String? = nil, + file: String = #fileID, function: String = #function, line: UInt = #line)
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - message - - -
    -

    The message to be logged. message can be used with any string interpolation literal.

    -
    -
    - - metadata - - -
    -

    One-off metadata to attach to this log message

    -
    -
    - - file - - -
    -

    The file this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #file).

    -
    -
    - - function - - -
    -

    The function this log message originates from (there’s usually no need to pass it explicitly as - it defaults to #function).

    -
    -
    - - line - - -
    -

    The line this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #line).

    -
    -
    -
    @@ -774,9 +790,9 @@ otherwise nothing will happen.

  • @@ -784,10 +800,76 @@ otherwise nothing will happen.

    -

    Log a message passing with the Logger.Level.warning log level.

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    -

    If .warning is at least as severe as the Logger‘s logLevel, it will be logged, -otherwise nothing will happen.

    +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func notice(_ message: @autoclosure () -> Logger.Message,
    +                   metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                   file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    @@ -797,82 +879,13 @@ otherwise nothing will happen.

    @inlinable
     public func warning(_ message: @autoclosure () -> Logger.Message,
                         metadata: @autoclosure () -> Logger.Metadata? = nil,
    -                    file: String = #file, function: String = #function, line: UInt = #line)
    + source: @autoclosure () -> String? = nil, + file: String = #fileID, function: String = #function, line: UInt = #line)
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - message - - -
    -

    The message to be logged. message can be used with any string interpolation literal.

    -
    -
    - - metadata - - -
    -

    One-off metadata to attach to this log message

    -
    -
    - - file - - -
    -

    The file this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #file).

    -
    -
    - - function - - -
    -

    The function this log message originates from (there’s usually no need to pass it explicitly as - it defaults to #function).

    -
    -
    - - line - - -
    -

    The line this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #line).

    -
    -
    -
    @@ -880,9 +893,9 @@ otherwise nothing will happen.

  • @@ -890,10 +903,76 @@ otherwise nothing will happen.

    -

    Log a message passing with the Logger.Level.error log level.

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    -

    If .error is at least as severe as the Logger‘s logLevel, it will be logged, -otherwise nothing will happen.

    +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func warning(_ message: @autoclosure () -> Logger.Message,
    +                    metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                    file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    @@ -903,82 +982,13 @@ otherwise nothing will happen.

    @inlinable
     public func error(_ message: @autoclosure () -> Logger.Message,
                       metadata: @autoclosure () -> Logger.Metadata? = nil,
    -                  file: String = #file, function: String = #function, line: UInt = #line)
    + source: @autoclosure () -> String? = nil, + file: String = #fileID, function: String = #function, line: UInt = #line)
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - message - - -
    -

    The message to be logged. message can be used with any string interpolation literal.

    -
    -
    - - metadata - - -
    -

    One-off metadata to attach to this log message

    -
    -
    - - file - - -
    -

    The file this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #file).

    -
    -
    - - function - - -
    -

    The function this log message originates from (there’s usually no need to pass it explicitly as - it defaults to #function).

    -
    -
    - - line - - -
    -

    The line this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #line).

    -
    -
    -
    @@ -986,9 +996,9 @@ otherwise nothing will happen.

  • @@ -996,9 +1006,76 @@ otherwise nothing will happen.

    -

    Log a message passing with the Logger.Level.critical log level.

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    -

    .critical messages will always be logged.

    +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func error(_ message: @autoclosure () -> Logger.Message,
    +                  metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                  file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    + +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    @@ -1008,82 +1085,82 @@ otherwise nothing will happen.

    @inlinable
     public func critical(_ message: @autoclosure () -> Logger.Message,
                          metadata: @autoclosure () -> Logger.Metadata? = nil,
    -                     file: String = #file, function: String = #function, line: UInt = #line)
    + source: @autoclosure () -> String? = nil, + file: String = #fileID, function: String = #function, line: UInt = #line)
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - message - - -
    -

    The message to be logged. message can be used with any string interpolation literal.

    -
    -
    - - metadata - - -
    -

    One-off metadata to attach to this log message

    -
    -
    - - file - - -
    -

    The file this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #file).

    -
    -
    - - function - - -
    -

    The function this log message originates from (there’s usually no need to pass it explicitly as - it defaults to #function).

    -
    -
    - - line - - -
    -

    The line this log message originates from (there’s usually no need to pass it explicitly as it - defaults to #line).

    -
    -
    + + +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @inlinable
    +public func critical(_ message: @autoclosure () -> Logger.Message,
    +                     metadata: @autoclosure () -> Logger.Metadata? = nil,
    +                     file: String = #fileID, function: String = #function, line: UInt = #line)
    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +
    @@ -1113,7 +1190,7 @@ otherwise nothing will happen.

    @@ -1142,7 +1219,7 @@ that when constructing MetadataValues you should default to using S
    • prefer logger.info("user logged in", metadata: ["user-id": "\(user.id)"]) over ..., metadata: ["user-id": .string(user.id.description)])
    • -
    • prefer logger.info("user selected colours", metadata: ["colors": ["\(user.topColor)", "\(user.secondColor)"]]) +
    • prefer logger.info("user selected colors", metadata: ["colors": ["\(user.topColor)", "\(user.secondColor)"]]) over ..., metadata: ["colors": .array([.string("\(user.topColor)"), .string("\(user.secondColor)")])
    • prefer logger.info("nested info", metadata: ["nested": ["fave-numbers": ["\(1)", "\(2)", "\(3)"], "foo": "bar"]]) over ..., metadata: ["nested": .dictionary(["fave-numbers": ...])])
    • @@ -1165,7 +1242,7 @@ over ..., metadata: ["nested": .dictionary(["fave-numbers&q @@ -1200,7 +1277,7 @@ over ..., metadata: ["nested": .dictionary(["fave-numbers&q @@ -1210,7 +1287,7 @@ over ..., metadata: ["nested": .dictionary(["fave-numbers&q - init(label:) + init(label:)
      @@ -1252,7 +1329,7 @@ a datatype.

      @@ -1262,7 +1339,7 @@ a datatype.

      - init(label:factory:) + init(label:factory:)
      @@ -1319,7 +1396,7 @@ using LoggingSystem.bootstrap is not appropriate for this particula
      @@ -1354,15 +1431,12 @@ using LoggingSystem.bootstrap is not appropriate for this particula

      Declaration

      Swift

      -
      public struct Message: ExpressibleByStringLiteral,
      -    Equatable,
      -    CustomStringConvertible,
      -    ExpressibleByStringInterpolation
      +
      public struct Message : ExpressibleByStringLiteral, Equatable, CustomStringConvertible, ExpressibleByStringInterpolation
      @@ -1375,9 +1449,8 @@ using LoggingSystem.bootstrap is not appropriate for this particula - diff --git a/docs/current/Logging/Structs/Logger/Level.html b/docs/current/Logging/Structs/Logger/Level.html index 4c3deda..c40efa6 100644 --- a/docs/current/Logging/Structs/Logger/Level.html +++ b/docs/current/Logging/Structs/Logger/Level.html @@ -21,27 +21,27 @@

      - Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

      -

      +

      -

      +

      - + GitHub View on GitHub

      - - + + Dash Install in Dash

      @@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ +
  • @@ -104,6 +107,7 @@

    Level

    +
    public enum Level : String, Codable, CaseIterable
    extension Logger.Level: Comparable
    @@ -114,6 +118,9 @@

    Log levels are ordered by their severity, with .trace being the least severe and .critical being the most severe.

    +
    @@ -134,7 +141,8 @@
    -

    Appropriate for messages that contain information only when debugging a program.

    +

    Appropriate for messages that contain information normally of use only when +tracing the execution of a program.

    @@ -146,7 +154,7 @@
    @@ -177,7 +185,7 @@ debugging a program.

    @@ -207,7 +215,7 @@ debugging a program.

    @@ -238,7 +246,7 @@ special handling.

    @@ -269,7 +277,7 @@ special handling.

    @@ -299,7 +307,7 @@ special handling.

    @@ -334,7 +342,7 @@ debugging.

    @@ -344,7 +352,7 @@ debugging.

    - <(_:_:) + <(_:_:)
    @@ -363,7 +371,7 @@ debugging.

    @@ -376,9 +384,8 @@ debugging.

    - diff --git a/docs/current/Logging/Structs/Logger/Message.html b/docs/current/Logging/Structs/Logger/Message.html index cbe6c51..1aca389 100644 --- a/docs/current/Logging/Structs/Logger/Message.html +++ b/docs/current/Logging/Structs/Logger/Message.html @@ -21,27 +21,27 @@

    - Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

    -

    +

    -

    +

    - + GitHub View on GitHub

    - - + + Dash Install in Dash

    @@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ + @@ -104,10 +107,8 @@

    Message

    -
    public struct Message: ExpressibleByStringLiteral,
    -    Equatable,
    -    CustomStringConvertible,
    -    ExpressibleByStringInterpolation
    + +
    public struct Message : ExpressibleByStringLiteral, Equatable, CustomStringConvertible, ExpressibleByStringInterpolation
    @@ -122,6 +123,9 @@
    logger.info("Hello \(world)")
     
    + @@ -153,7 +157,7 @@ @@ -163,7 +167,7 @@ - init(stringLiteral:) + init(stringLiteral:)
    @@ -182,7 +186,7 @@
    @@ -211,7 +215,7 @@ @@ -224,9 +228,8 @@ - diff --git a/docs/current/Logging/Structs/Logger/MetadataValue.html b/docs/current/Logging/Structs/Logger/MetadataValue.html index 8652bf0..f7378b4 100644 --- a/docs/current/Logging/Structs/Logger/MetadataValue.html +++ b/docs/current/Logging/Structs/Logger/MetadataValue.html @@ -21,27 +21,27 @@

    - Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

    -

    +

    -

    +

    - + GitHub View on GitHub

    - - + + Dash Install in Dash

    @@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ + @@ -104,6 +107,7 @@

    MetadataValue

    +
    public enum MetadataValue
    extension Logger.MetadataValue: Equatable
    extension Logger.MetadataValue: ExpressibleByStringLiteral
    @@ -125,12 +129,15 @@ that when constructing MetadataValues you should default to using S
    • prefer logger.info("user logged in", metadata: ["user-id": "\(user.id)"]) over ..., metadata: ["user-id": .string(user.id.description)])
    • -
    • prefer logger.info("user selected colours", metadata: ["colors": ["\(user.topColor)", "\(user.secondColor)"]]) +
    • prefer logger.info("user selected colors", metadata: ["colors": ["\(user.topColor)", "\(user.secondColor)"]]) over ..., metadata: ["colors": .array([.string("\(user.topColor)"), .string("\(user.secondColor)")])
    • prefer logger.info("nested info", metadata: ["nested": ["fave-numbers": ["\(1)", "\(2)", "\(3)"], "foo": "bar"]]) over ..., metadata: ["nested": .dictionary(["fave-numbers": ...])])
    +
    @@ -143,7 +150,7 @@ over ..., metadata: ["nested": .dictionary(["fave-numbers&q - string(_:) + string(_:)
    @@ -166,7 +173,7 @@ you don’t need to type .string(someType.description) you can
    @@ -176,7 +183,7 @@ you don’t need to type .string(someType.description) you can - stringConvertible(_:) + stringConvertible(_:)
    @@ -196,7 +203,7 @@ you don’t need to type .string(someType.description) you can
    @@ -206,7 +213,7 @@ you don’t need to type .string(someType.description) you can - dictionary(_:) + dictionary(_:)
    @@ -229,7 +236,7 @@ you don’t need to type .string(someType.description) you can
    @@ -239,7 +246,7 @@ you don’t need to type .string(someType.description) you can - array(_:) + array(_:)
    @@ -262,7 +269,7 @@ you don’t need to type .string(someType.description) you can
    @@ -272,7 +279,7 @@ you don’t need to type .string(someType.description) you can - ==(_:_:) + ==(_:_:)
    @@ -291,7 +298,7 @@ you don’t need to type .string(someType.description) you can
    @@ -320,7 +327,7 @@ you don’t need to type .string(someType.description) you can @@ -330,7 +337,7 @@ you don’t need to type .string(someType.description) you can - init(stringLiteral:) + init(stringLiteral:)
    @@ -349,7 +356,7 @@ you don’t need to type .string(someType.description) you can
    @@ -378,7 +385,7 @@ you don’t need to type .string(someType.description) you can @@ -407,7 +414,7 @@ you don’t need to type .string(someType.description) you can @@ -436,7 +443,7 @@ you don’t need to type .string(someType.description) you can @@ -446,7 +453,7 @@ you don’t need to type .string(someType.description) you can - init(dictionaryLiteral:) + init(dictionaryLiteral:)
    @@ -465,7 +472,7 @@ you don’t need to type .string(someType.description) you can
    @@ -494,7 +501,7 @@ you don’t need to type .string(someType.description) you can @@ -504,7 +511,7 @@ you don’t need to type .string(someType.description) you can - init(arrayLiteral:) + init(arrayLiteral:)
    @@ -523,7 +530,7 @@ you don’t need to type .string(someType.description) you can
    @@ -536,9 +543,8 @@ you don’t need to type .string(someType.description) you can - diff --git a/docs/current/Logging/Structs/MultiplexLogHandler.html b/docs/current/Logging/Structs/MultiplexLogHandler.html index 71e42ee..d86dd00 100644 --- a/docs/current/Logging/Structs/MultiplexLogHandler.html +++ b/docs/current/Logging/Structs/MultiplexLogHandler.html @@ -21,27 +21,27 @@

    - Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

    -

    +

    -

    +

    - + GitHub View on GitHub

    - - + + Dash Install in Dash

    @@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ + @@ -104,16 +107,58 @@

    MultiplexLogHandler

    +
    public struct MultiplexLogHandler : LogHandler

    A pseudo-LogHandler that can be used to send messages to multiple other LogHandlers.

    +

    Effective Logger.Level

    -

    The first LogHandler passed to the initialisation function of MultiplexLogHandler control the logLevel as -well as the metadata for this LogHandler. Any subsequent LogHandlers used to initialise a -MultiplexLogHandler are merely to emit the log message to another place.

    +

    When first initialized the multiplex log handlers’ log level is automatically set to the minimum of all the +passed in log handlers. This ensures that each of the handlers will be able to log at their appropriate level +any log events they might be interested in.

    +

    Example: +If log handler A is logging at .debug level, and log handler B is logging at .info level, the constructed +MultiplexLogHandler([A, B])‘s effective log level will be set to .debug, meaning that debug messages will be +handled by this handler, while only logged by the underlying A log handler (since B’s log level is .info +and thus it would not actually log that log message).

    + +

    If the log level is set on a Logger backed by an MultiplexLogHandler the log level will apply to all +underlying log handlers, allowing a logger to still select at what level it wants to log regardless of if the underlying +handler is a multiplex or a normal one. If for some reason one might want to not allow changing a log level of a specific +handler passed into the multiplex log handler, this is possible by wrapping it in a handler which ignores any log level changes.

    +

    Effective Logger.Metadata

    + +

    Since a MultiplexLogHandler is a combination of multiple log handlers, the handling of metadata can be non-obvious. +For example, the underlying log handlers may have metadata of their own set before they are used to initialize the multiplex log handler.

    + +

    The multiplex log handler acts purely as proxy and does not make any changes to underlying handler metadata other than +proxying writes that users made on a Logger instance backed by this handler.

    + +

    Setting metadata is always proxied through to all underlying handlers, meaning that if a modification like +logger[metadataKey: "x"] = "y" is made, all underlying log handlers that this multiplex handler was initiated with +will observe this change.

    + +

    Reading metadata from the multiplex log handler MAY need to pick one of conflicting values if the underlying log handlers +were already initiated with some metadata before passing them into the multiplex handler. The multiplex handler uses +the order in which the handlers were passed in during its initialization as a priority indicator - the first handler’s +values are more important than the next handlers values, etc.

    + +

    Example: +If the multiplex log handler was initiated with two handlers like this: MultiplexLogHandler([handler1, handler2]). +The handlers each have some already set metadata: handler1 has metadata values for keys one and all, and handler2 +has values for keys two and all.

    + +

    A query through the multiplex log handler the key one naturally returns handler1’s value, and a query for two +naturally returns handler2’s value. Querying for the key all will return handler1’s value, as that handler was indicated +“more important” than the second handler. The same rule applies when querying for the metadata property of the +multiplex log handler - it constructs Metadata uniquing values.

    + + @@ -126,7 +171,7 @@ well as the metadata for this - init(_:) + init(_:)
    @@ -166,7 +211,7 @@ well as the metadata for this - Show on GitHub + Show on GitHub
    @@ -195,7 +240,7 @@ well as the metadata for this - Show on GitHub + Show on GitHub @@ -203,9 +248,9 @@ well as the metadata for this
    @@ -222,12 +267,15 @@ well as the metadata for this public func log(level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata?, - file: String, function: String, line: UInt) + source: String, + file: String, + function: String, + line: UInt)
    @@ -256,7 +304,7 @@ well as the metadata for this - Show on GitHub + Show on GitHub @@ -266,7 +314,7 @@ well as the metadata for this - subscript(metadataKey:) + subscript(metadataKey:)
    @@ -280,12 +328,12 @@ well as the metadata for this

    Swift

    -
    public subscript(metadataKey metadataKey: String) -> Logger.Metadata.Value? { get set }
    +
    public subscript(metadataKey metadataKey: Logger.Metadata.Key) -> Logger.Metadata.Value? { get set }
    @@ -298,9 +346,8 @@ well as the metadata for this -

    © 2020 SwiftLog team. All rights reserved. (Last updated: 2020-02-28)

    -

    Generated by jazzy ♪♫ v0.13.1, a Realm project.

    +

    © 2021 SwiftLog team. All rights reserved. (Last updated: 2021-12-17)

    +

    Generated by jazzy ♪♫ v0.14.1, a Realm project.

    - diff --git a/docs/current/Logging/Structs/StreamLogHandler.html b/docs/current/Logging/Structs/StreamLogHandler.html index 1f64a1e..59e04ce 100644 --- a/docs/current/Logging/Structs/StreamLogHandler.html +++ b/docs/current/Logging/Structs/StreamLogHandler.html @@ -21,27 +21,27 @@

    - Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

    -

    +

    -

    +

    - + GitHub View on GitHub

    - - + + Dash Install in Dash

    @@ -49,7 +49,7 @@ @@ -93,6 +93,9 @@ + @@ -104,6 +107,7 @@

    StreamLogHandler

    +
    public struct StreamLogHandler : LogHandler
    @@ -111,6 +115,9 @@

    StreamLogHandler is a simple implementation of LogHandler for directing Logger output to either stderr or stdout via the factory methods.

    +
    @@ -123,7 +130,7 @@ - standardOutput(label:) + standardOutput(label:)
    @@ -143,7 +150,7 @@
    @@ -153,7 +160,7 @@ - standardError(label:) + standardError(label:)
    @@ -173,7 +180,7 @@
    @@ -202,7 +209,7 @@ @@ -231,7 +238,7 @@ @@ -241,7 +248,7 @@ - subscript(metadataKey:) + subscript(metadataKey:)
    @@ -260,7 +267,7 @@
    @@ -268,9 +275,9 @@
  • @@ -287,12 +294,15 @@
    public func log(level: Logger.Level,
                     message: Logger.Message,
                     metadata: Logger.Metadata?,
    -                file: String, function: String, line: UInt)
    + source: String, + file: String, + function: String, + line: UInt)
    @@ -305,9 +315,8 @@ - diff --git a/docs/current/Logging/Structs/SwiftLogNoOpLogHandler.html b/docs/current/Logging/Structs/SwiftLogNoOpLogHandler.html new file mode 100644 index 0000000..214d214 --- /dev/null +++ b/docs/current/Logging/Structs/SwiftLogNoOpLogHandler.html @@ -0,0 +1,320 @@ + + + + SwiftLogNoOpLogHandler Structure Reference + + + + + + + + + + + + + + + + +
    +

    + + Logging 1.4.2 Docs + + (81% documented) +

    + +
    +
    + +
    +
    + +

    + + GitHub + View on GitHub + +

    + +

    + + Dash + Install in Dash + +

    +
    + + + +
    + +
    + +
    +
    +

    SwiftLogNoOpLogHandler

    +
    +
    + +
    public struct SwiftLogNoOpLogHandler : LogHandler
    + +
    +
    +

    No operation LogHandler, used when no logging is required

    + + +
    +
    + +
    +
    +
    +
      +
    • +
      + + + + init() + +
      +
      +
      +
      +
      +
      +

      Undocumented

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public init()
      + +
      +
      + +
      +
      +
    • +
    • +
      + + + + init(_:) + +
      +
      +
      +
      +
      +
      +

      Undocumented

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public init(_: String)
      + +
      +
      + +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      @available(*, deprecated, renamed: "log(level:message:metadata:source:file:function:line:﹚")
      +@inlinable
      +public func log(level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata?, file: String, function: String, line: UInt)
      + +
      +
      + +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      @inlinable
      +public subscript(metadataKey _: String) -> Logger.Metadata.Value? { get set }
      + +
      +
      + +
      +
      +
    • +
    • +
      + + + + metadata + +
      +
      +
      +
      +
      +
      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      @inlinable
      +public var metadata: Logger.Metadata { get set }
      + +
      +
      + +
      +
      +
    • +
    • +
      + + + + logLevel + +
      +
      +
      +
      +
      +
      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      @inlinable
      +public var logLevel: Logger.Level { get set }
      + +
      +
      + +
      +
      +
    • +
    +
    +
    +
    + +
    +
    + + + diff --git a/docs/current/Logging/badge.svg b/docs/current/Logging/badge.svg index a096fec..b5adf50 100644 --- a/docs/current/Logging/badge.svg +++ b/docs/current/Logging/badge.svg @@ -1,15 +1,15 @@ - + - + - - + + @@ -18,11 +18,11 @@ documentation - - 100% + + 81% - - 100% + + 81% diff --git a/docs/current/Logging/css/highlight.css b/docs/current/Logging/css/highlight.css index d0db0e1..c170357 100644 --- a/docs/current/Logging/css/highlight.css +++ b/docs/current/Logging/css/highlight.css @@ -1,200 +1,202 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ /* Credit to https://gist.github.com/wataru420/2048287 */ -.highlight { - /* Comment */ - /* Error */ - /* Keyword */ - /* Operator */ - /* Comment.Multiline */ - /* Comment.Preproc */ - /* Comment.Single */ - /* Comment.Special */ - /* Generic.Deleted */ - /* Generic.Deleted.Specific */ - /* Generic.Emph */ - /* Generic.Error */ - /* Generic.Heading */ - /* Generic.Inserted */ - /* Generic.Inserted.Specific */ - /* Generic.Output */ - /* Generic.Prompt */ - /* Generic.Strong */ - /* Generic.Subheading */ - /* Generic.Traceback */ - /* Keyword.Constant */ - /* Keyword.Declaration */ - /* Keyword.Pseudo */ - /* Keyword.Reserved */ - /* Keyword.Type */ - /* Literal.Number */ - /* Literal.String */ - /* Name.Attribute */ - /* Name.Builtin */ - /* Name.Class */ - /* Name.Constant */ - /* Name.Entity */ - /* Name.Exception */ - /* Name.Function */ - /* Name.Namespace */ - /* Name.Tag */ - /* Name.Variable */ - /* Operator.Word */ - /* Text.Whitespace */ - /* Literal.Number.Float */ - /* Literal.Number.Hex */ - /* Literal.Number.Integer */ - /* Literal.Number.Oct */ - /* Literal.String.Backtick */ - /* Literal.String.Char */ - /* Literal.String.Doc */ - /* Literal.String.Double */ - /* Literal.String.Escape */ - /* Literal.String.Heredoc */ - /* Literal.String.Interpol */ - /* Literal.String.Other */ - /* Literal.String.Regex */ - /* Literal.String.Single */ - /* Literal.String.Symbol */ - /* Name.Builtin.Pseudo */ - /* Name.Variable.Class */ - /* Name.Variable.Global */ - /* Name.Variable.Instance */ - /* Literal.Number.Integer.Long */ } - .highlight .c { - color: #999988; - font-style: italic; } - .highlight .err { - color: #a61717; - background-color: #e3d2d2; } - .highlight .k { - color: #000000; - font-weight: bold; } - .highlight .o { - color: #000000; - font-weight: bold; } - .highlight .cm { - color: #999988; - font-style: italic; } - .highlight .cp { - color: #999999; - font-weight: bold; } - .highlight .c1 { - color: #999988; - font-style: italic; } - .highlight .cs { - color: #999999; - font-weight: bold; - font-style: italic; } - .highlight .gd { - color: #000000; - background-color: #ffdddd; } - .highlight .gd .x { - color: #000000; - background-color: #ffaaaa; } - .highlight .ge { - color: #000000; - font-style: italic; } - .highlight .gr { - color: #aa0000; } - .highlight .gh { - color: #999999; } - .highlight .gi { - color: #000000; - background-color: #ddffdd; } - .highlight .gi .x { - color: #000000; - background-color: #aaffaa; } - .highlight .go { - color: #888888; } - .highlight .gp { - color: #555555; } - .highlight .gs { - font-weight: bold; } - .highlight .gu { - color: #aaaaaa; } - .highlight .gt { - color: #aa0000; } - .highlight .kc { - color: #000000; - font-weight: bold; } - .highlight .kd { - color: #000000; - font-weight: bold; } - .highlight .kp { - color: #000000; - font-weight: bold; } - .highlight .kr { - color: #000000; - font-weight: bold; } - .highlight .kt { - color: #445588; } - .highlight .m { - color: #009999; } - .highlight .s { - color: #d14; } - .highlight .na { - color: #008080; } - .highlight .nb { - color: #0086B3; } - .highlight .nc { - color: #445588; - font-weight: bold; } - .highlight .no { - color: #008080; } - .highlight .ni { - color: #800080; } - .highlight .ne { - color: #990000; - font-weight: bold; } - .highlight .nf { - color: #990000; } - .highlight .nn { - color: #555555; } - .highlight .nt { - color: #000080; } - .highlight .nv { - color: #008080; } - .highlight .ow { - color: #000000; - font-weight: bold; } - .highlight .w { - color: #bbbbbb; } - .highlight .mf { - color: #009999; } - .highlight .mh { - color: #009999; } - .highlight .mi { - color: #009999; } - .highlight .mo { - color: #009999; } - .highlight .sb { - color: #d14; } - .highlight .sc { - color: #d14; } - .highlight .sd { - color: #d14; } - .highlight .s2 { - color: #d14; } - .highlight .se { - color: #d14; } - .highlight .sh { - color: #d14; } - .highlight .si { - color: #d14; } - .highlight .sx { - color: #d14; } - .highlight .sr { - color: #009926; } - .highlight .s1 { - color: #d14; } - .highlight .ss { - color: #990073; } - .highlight .bp { - color: #999999; } - .highlight .vc { - color: #008080; } - .highlight .vg { - color: #008080; } - .highlight .vi { - color: #008080; } - .highlight .il { - color: #009999; } +.highlight .c { + color: #999988; + font-style: italic; } + +.highlight .err { + color: #a61717; + background-color: #e3d2d2; } + +.highlight .k { + color: #000000; + font-weight: bold; } + +.highlight .o { + color: #000000; + font-weight: bold; } + +.highlight .cm { + color: #999988; + font-style: italic; } + +.highlight .cp { + color: #999999; + font-weight: bold; } + +.highlight .c1 { + color: #999988; + font-style: italic; } + +.highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + +.highlight .gd { + color: #000000; + background-color: #ffdddd; } + +.highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + +.highlight .ge { + color: #000000; + font-style: italic; } + +.highlight .gr { + color: #aa0000; } + +.highlight .gh { + color: #999999; } + +.highlight .gi { + color: #000000; + background-color: #ddffdd; } + +.highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + +.highlight .go { + color: #888888; } + +.highlight .gp { + color: #555555; } + +.highlight .gs { + font-weight: bold; } + +.highlight .gu { + color: #aaaaaa; } + +.highlight .gt { + color: #aa0000; } + +.highlight .kc { + color: #000000; + font-weight: bold; } + +.highlight .kd { + color: #000000; + font-weight: bold; } + +.highlight .kp { + color: #000000; + font-weight: bold; } + +.highlight .kr { + color: #000000; + font-weight: bold; } + +.highlight .kt { + color: #445588; } + +.highlight .m { + color: #009999; } + +.highlight .s { + color: #d14; } + +.highlight .na { + color: #008080; } + +.highlight .nb { + color: #0086B3; } + +.highlight .nc { + color: #445588; + font-weight: bold; } + +.highlight .no { + color: #008080; } + +.highlight .ni { + color: #800080; } + +.highlight .ne { + color: #990000; + font-weight: bold; } + +.highlight .nf { + color: #990000; } + +.highlight .nn { + color: #555555; } + +.highlight .nt { + color: #000080; } + +.highlight .nv { + color: #008080; } + +.highlight .ow { + color: #000000; + font-weight: bold; } + +.highlight .w { + color: #bbbbbb; } + +.highlight .mf { + color: #009999; } + +.highlight .mh { + color: #009999; } + +.highlight .mi { + color: #009999; } + +.highlight .mo { + color: #009999; } + +.highlight .sb { + color: #d14; } + +.highlight .sc { + color: #d14; } + +.highlight .sd { + color: #d14; } + +.highlight .s2 { + color: #d14; } + +.highlight .se { + color: #d14; } + +.highlight .sh { + color: #d14; } + +.highlight .si { + color: #d14; } + +.highlight .sx { + color: #d14; } + +.highlight .sr { + color: #009926; } + +.highlight .s1 { + color: #d14; } + +.highlight .ss { + color: #990073; } + +.highlight .bp { + color: #999999; } + +.highlight .vc { + color: #008080; } + +.highlight .vg { + color: #008080; } + +.highlight .vi { + color: #008080; } + +.highlight .il { + color: #009999; } diff --git a/docs/current/Logging/css/jazzy.css b/docs/current/Logging/css/jazzy.css index 3ca6b31..c7bb9fe 100644 --- a/docs/current/Logging/css/jazzy.css +++ b/docs/current/Logging/css/jazzy.css @@ -1,3 +1,7 @@ +/*! Jazzy - https://github.com/realm/jazzy + * Copyright Realm Inc. + * SPDX-License-Identifier: MIT + */ *, *:before, *:after { box-sizing: inherit; } @@ -83,6 +87,11 @@ th, td { padding: 6px 13px; border: 1px solid #ddd; } +hr { + height: 1px; + border: none; + background-color: #ddd; } + pre { margin: 0 0 1.275em; padding: .85em 1em; @@ -111,7 +120,6 @@ pre code { @media (min-width: 768px) { .content-wrapper { flex-direction: row; } } - .header { display: flex; padding: 8px; @@ -130,8 +138,8 @@ pre code { color: #fff; } .header-icon { - padding-right: 6px; - vertical-align: -4px; + padding-right: 2px; + vertical-align: -3px; height: 16px; } .breadcrumbs { @@ -157,7 +165,6 @@ pre code { word-wrap: normal; background: #fbfbfb; border-right: 1px solid #ddd; } } - .nav-groups { list-style-type: none; padding-left: 0; } @@ -188,7 +195,6 @@ pre code { order: 2; flex: 1; padding-bottom: 60px; } } - .section { padding: 0 32px; border-bottom: 1px solid #ddd; } @@ -248,8 +254,10 @@ pre code { content: ""; display: block; } .item .token, .item .direct-link { + display: inline-block; + text-indent: -20px; padding-left: 3px; - margin-left: 0px; + margin-left: 20px; font-size: 1rem; } .item .declaration-note { font-size: .85em; diff --git a/docs/current/Logging/index.html b/docs/current/Logging/index.html index 79ed83a..e05aefa 100644 --- a/docs/current/Logging/index.html +++ b/docs/current/Logging/index.html @@ -20,27 +20,27 @@

    - Logging 1.2.0 Docs + Logging 1.4.2 Docs - (100% documented) + (81% documented)

    -

    +

    -

    +

    - + GitHub View on GitHub

    - - + + Dash Install in Dash

    @@ -48,7 +48,7 @@ @@ -92,6 +92,9 @@
  • + @@ -116,9 +119,8 @@ which you can use to emit log messages.

    - diff --git a/docs/current/Logging/js/jazzy.js b/docs/current/Logging/js/jazzy.js index c31dc05..1984416 100755 --- a/docs/current/Logging/js/jazzy.js +++ b/docs/current/Logging/js/jazzy.js @@ -1,3 +1,7 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + window.jazzy = {'docset': false} if (typeof window.dash != 'undefined') { document.documentElement.className += ' dash' @@ -23,7 +27,7 @@ function openCurrentItemIfClosed() { if (window.jazzy.docset) { return; } - var $link = $(`.token[href="${location.hash}"]`); + var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); $content = itemLinkToContent($link); if ($content.is(':hidden')) { toggleItem($link, $content); @@ -57,3 +61,14 @@ $("a:not('.token')").on('click', function() { openCurrentItemIfClosed(); } }); + +// KaTeX rendering +if ("katex" in window) { + $($('.math').each( (_, element) => { + katex.render(element.textContent, element, { + displayMode: $(element).hasClass('m-block'), + throwOnError: false, + trust: true + }); + })) +} diff --git a/docs/current/Logging/js/jazzy.search.js b/docs/current/Logging/js/jazzy.search.js index e3d1ab9..359cdbb 100644 --- a/docs/current/Logging/js/jazzy.search.js +++ b/docs/current/Logging/js/jazzy.search.js @@ -1,3 +1,7 @@ +// Jazzy - https://github.com/realm/jazzy +// Copyright Realm Inc. +// SPDX-License-Identifier: MIT + $(function(){ var $typeahead = $('[data-typeahead]'); var $form = $typeahead.parents('form'); diff --git a/docs/current/Logging/js/jquery.min.js b/docs/current/Logging/js/jquery.min.js index a1c07fd..c4c6022 100644 --- a/docs/current/Logging/js/jquery.min.js +++ b/docs/current/Logging/js/jquery.min.js @@ -1,2 +1,2 @@ -/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0=this.length)return z.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},z.QueryLexer.prototype.width=function(){return this.pos-this.start},z.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},z.QueryLexer.prototype.backup=function(){this.pos-=1},z.QueryLexer.prototype.acceptDigitRun=function(){for(var e,t;47<(t=(e=this.next()).charCodeAt(0))&&t<58;);e!=z.QueryLexer.EOS&&this.backup()},z.QueryLexer.prototype.more=function(){return this.pos0){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/docs/current/Logging/js/typeahead.jquery.js b/docs/current/Logging/js/typeahead.jquery.js index f80bb19..3a2d2ab 100644 --- a/docs/current/Logging/js/typeahead.jquery.js +++ b/docs/current/Logging/js/typeahead.jquery.js @@ -1,15 +1,16 @@ /*! - * typeahead.js 1.2.0 - * https://github.com/twitter/typeahead.js - * Copyright 2013-2017 Twitter, Inc. and other contributors; Licensed MIT + * typeahead.js 1.3.1 + * https://github.com/corejavascript/typeahead.js + * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT */ + (function(root, factory) { if (typeof define === "function" && define.amd) { define([ "jquery" ], function(a0) { return factory(a0); }); - } else if (typeof exports === "object") { + } else if (typeof module === "object" && module.exports) { module.exports = factory(require("jquery")); } else { factory(root["jQuery"]); @@ -482,6 +483,7 @@ 40: "down" }; function Input(o, www) { + var id; o = o || {}; if (!o.input) { $.error("input is missing"); @@ -489,14 +491,18 @@ www.mixin(this); this.$hint = $(o.hint); this.$input = $(o.input); - this.$input.attr({ - "aria-activedescendant": "", - "aria-owns": this.$input.attr("id") + "_listbox", - role: "combobox", - "aria-readonly": "true", - "aria-autocomplete": "list" + this.$menu = $(o.menu); + id = this.$input.attr("id") || _.guid(); + this.$menu.attr("id", id + "_listbox"); + this.$hint.attr({ + "aria-hidden": true + }); + this.$input.attr({ + "aria-owns": id + "_listbox", + role: "combobox", + "aria-autocomplete": "list", + "aria-expanded": false }); - $(www.menu).attr("id", this.$input.attr("id") + "_listbox"); this.query = this.$input.val(); this.queryWhenFocused = this.hasFocus() ? this.query : null; this.$overflowHelper = buildOverflowHelper(this.$input); @@ -669,6 +675,9 @@ this.$input.off(".tt"); this.$overflowHelper.remove(); this.$hint = this.$input = this.$overflowHelper = $("
    "); + }, + setAriaExpanded: function setAriaExpanded(value) { + this.$input.attr("aria-expanded", value); } }); return Input; @@ -896,8 +905,12 @@ pending: templates.pending && _.templatify(templates.pending), header: templates.header && _.templatify(templates.header), footer: templates.footer && _.templatify(templates.footer), - suggestion: templates.suggestion || suggestionTemplate + suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate }; + function userSuggestionTemplate(context) { + var template = templates.suggestion; + return $(template(context)).attr("id", _.guid()); + } function suggestionTemplate(context) { return $('
    ').attr("id", _.guid()).text(displayFn(context)); } @@ -1256,8 +1269,10 @@ var $selectable; if ($selectable = this.menu.getActiveSelectable()) { this.select($selectable) && $e.preventDefault(); - } else if ($selectable = this.menu.getTopSelectable()) { - this.autocomplete($selectable) && $e.preventDefault(); + } else if (this.autoselect) { + if ($selectable = this.menu.getTopSelectable()) { + this.autocomplete($selectable) && $e.preventDefault(); + } } }, _onEscKeyed: function onEscKeyed() { @@ -1353,6 +1368,7 @@ }, open: function open() { if (!this.isOpen() && !this.eventBus.before("open")) { + this.input.setAriaExpanded(true); this.menu.open(); this._updateHint(); this.eventBus.trigger("open"); @@ -1361,6 +1377,7 @@ }, close: function close() { if (this.isOpen() && !this.eventBus.before("close")) { + this.input.setAriaExpanded(false); this.menu.close(); this.input.clearHint(); this.input.resetInputValue(); @@ -1409,7 +1426,9 @@ if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { this.menu.setCursor($candidate); if (data) { - this.input.setInputValue(data.val); + if (typeof data.val === "string") { + this.input.setInputValue(data.val); + } } else { this.input.resetInputValue(); this._updateHint(); @@ -1477,7 +1496,8 @@ }); input = new Input({ hint: $hint, - input: $input + input: $input, + menu: $menu }, www); menu = new MenuConstructor({ node: $menu, diff --git a/docs/current/Logging/search.json b/docs/current/Logging/search.json index 28dc78d..5307965 100644 --- a/docs/current/Logging/search.json +++ b/docs/current/Logging/search.json @@ -1 +1 @@ -{"Structs/StreamLogHandler.html#/s:7Logging16StreamLogHandlerV14standardOutput5labelACSS_tFZ":{"name":"standardOutput(label:)","abstract":"

    Factory that makes a StreamLogHandler to directs its output to stdout

    ","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging16StreamLogHandlerV13standardError5labelACSS_tFZ":{"name":"standardError(label:)","abstract":"

    Factory that makes a StreamLogHandler to directs its output to stderr

    ","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata4file8function4lineyAA6LoggerV5LevelO_AL7MessageVSDySSAL13MetadataValueOGSgS2SSutF":{"name":"log(level:message:metadata:file:function:line:)","parent_name":"StreamLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging19MultiplexLogHandlerVyACSayAA0cD0_pGcfc":{"name":"init(_:)","abstract":"

    Create a MultiplexLogHandler.

    ","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata4file8function4lineyAA6LoggerV5LevelO_AL7MessageVSDySSAL13MetadataValueOGSgS2SSutF":{"name":"log(level:message:metadata:file:function:line:)","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","parent_name":"MultiplexLogHandler"},"Structs/Logger/Message.html#/s:s26ExpressibleByStringLiteralP0cD4TypeQa":{"name":"StringLiteralType","parent_name":"Message"},"Structs/Logger/Message.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"Message"},"Structs/Logger/Message.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"Message"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO5traceyA2EmF":{"name":"trace","abstract":"

    Appropriate for messages that contain information only when debugging a program.

    ","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO5debugyA2EmF":{"name":"debug","abstract":"

    Appropriate for messages that contain information normally of use only when","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO4infoyA2EmF":{"name":"info","abstract":"

    Appropriate for informational messages.

    ","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO6noticeyA2EmF":{"name":"notice","abstract":"

    Appropriate for conditions that are not error conditions, but that may require","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO7warningyA2EmF":{"name":"warning","abstract":"

    Appropriate for messages that are not error conditions, but more severe than","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO5erroryA2EmF":{"name":"error","abstract":"

    Appropriate for error conditions.

    ","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO8criticalyA2EmF":{"name":"critical","abstract":"

    Appropriate for critical error conditions that usually require immediate","parent_name":"Level"},"Structs/Logger/Level.html#/s:SL1loiySbx_xtFZ":{"name":"<(_:_:)","parent_name":"Level"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO6stringyAESScAEmF":{"name":"string(_:)","abstract":"

    A metadata value which is a String.

    ","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO17stringConvertibleyAEs012CustomStringF0_pcAEmF":{"name":"stringConvertible(_:)","abstract":"

    A metadata value which is some CustomStringConvertible.

    ","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO10dictionaryyAESDySSAEGcAEmF":{"name":"dictionary(_:)","abstract":"

    A metadata value which is a dictionary from String to Logger.MetadataValue.

    ","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO5arrayyAESayAEGcAEmF":{"name":"array(_:)","abstract":"

    A metadata value which is an array of Logger.MetadataValues.

    ","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s26ExpressibleByStringLiteralP0cD4TypeQa":{"name":"StringLiteralType","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s30ExpressibleByDictionaryLiteralP3KeyQa":{"name":"Key","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s30ExpressibleByDictionaryLiteralP5ValueQa":{"name":"Value","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s30ExpressibleByDictionaryLiteralP010dictionaryD0x3KeyQz_5ValueQztd_tcfc":{"name":"init(dictionaryLiteral:)","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s25ExpressibleByArrayLiteralP0cD7ElementQa":{"name":"ArrayLiteralElement","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s25ExpressibleByArrayLiteralP05arrayD0x0cD7ElementQzd_tcfc":{"name":"init(arrayLiteral:)","parent_name":"MetadataValue"},"Structs/Logger.html#/s:7Logging6LoggerV5labelSSvp":{"name":"label","abstract":"

    An identifier of the creator of this Logger.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV3log5level_8metadata4file8function4lineyAC5LevelO_AC7MessageVyXKSDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"log(level:_:metadata:file:function:line:)","abstract":"

    Log a message passing the log level as a parameter.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV11metadataKeyAC13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","abstract":"

    Add, change, or remove a logging metadata item.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8logLevelAC0D0Ovp":{"name":"logLevel","abstract":"

    Get or set the log level configured for this Logger.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5trace_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"trace(_:metadata:file:function:line:)","abstract":"

    Log a message passing with the Logger.Level.trace log level.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5debug_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"debug(_:metadata:file:function:line:)","abstract":"

    Log a message passing with the Logger.Level.debug log level.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV4info_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"info(_:metadata:file:function:line:)","abstract":"

    Log a message passing with the Logger.Level.info log level.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV6notice_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"notice(_:metadata:file:function:line:)","abstract":"

    Log a message passing with the Logger.Level.notice log level.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV7warning_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"warning(_:metadata:file:function:line:)","abstract":"

    Log a message passing with the Logger.Level.warning log level.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5error_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"error(_:metadata:file:function:line:)","abstract":"

    Log a message passing with the Logger.Level.error log level.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8critical_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"critical(_:metadata:file:function:line:)","abstract":"

    Log a message passing with the Logger.Level.critical log level.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8Metadataa":{"name":"Metadata","abstract":"

    Metadata is a typealias for [String: Logger.MetadataValue] the type of the metadata storage.

    ","parent_name":"Logger"},"Structs/Logger/MetadataValue.html":{"name":"MetadataValue","abstract":"

    A logging metadata value. Logger.MetadataValue is string, array, and dictionary literal convertible.

    ","parent_name":"Logger"},"Structs/Logger/Level.html":{"name":"Level","abstract":"

    The log level.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5labelACSS_tcfc":{"name":"init(label:)","abstract":"

    Construct a Logger given a label identifying the creator of the Logger.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5label7factoryACSS_AA10LogHandler_pSSXEtcfc":{"name":"init(label:factory:)","abstract":"

    Construct a Logger given a label identifying the creator of the Logger or a non-standard LogHandler.

    ","parent_name":"Logger"},"Structs/Logger/Message.html":{"name":"Message","abstract":"

    Logger.Message represents a log message’s text. It is usually created using string literals.

    ","parent_name":"Logger"},"Structs/Logger.html":{"name":"Logger","abstract":"

    A Logger is the central type in SwiftLog. Its central function is to emit log messages using one of the methods"},"Structs/MultiplexLogHandler.html":{"name":"MultiplexLogHandler","abstract":"

    A pseudo-LogHandler that can be used to send messages to multiple other LogHandlers.

    "},"Structs/StreamLogHandler.html":{"name":"StreamLogHandler","abstract":"

    StreamLogHandler is a simple implementation of LogHandler for directing"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata4file8function4lineyAA6LoggerV5LevelO_AL7MessageVSDySSAL13MetadataValueOGSgS2SSutF":{"name":"log(level:message:metadata:file:function:line:)","abstract":"

    This method is called when a LogHandler must emit a log message. There is no need for the LogHandler to","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","abstract":"

    Add, remove, or change the logging metadata.

    ","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","abstract":"

    Get or set the entire metadata storage as a dictionary.

    ","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","abstract":"

    Get or set the configured log level.

    ","parent_name":"LogHandler"},"Protocols/LogHandler.html":{"name":"LogHandler","abstract":"

    A LogHandler is an implementation of a logging backend.

    "},"Enums/LoggingSystem.html#/s:7Logging0A6SystemO9bootstrapyyAA10LogHandler_pSScFZ":{"name":"bootstrap(_:)","abstract":"

    bootstrap is a one-time configuration function which globally selects the desired logging backend","parent_name":"LoggingSystem"},"Enums/LoggingSystem.html":{"name":"LoggingSystem","abstract":"

    The LoggingSystem is a global facility where the default logging backend implementation (LogHandler) can be"},"Enums.html":{"name":"Enumerations","abstract":"

    The following enumerations are available globally.

    "},"Protocols.html":{"name":"Protocols","abstract":"

    The following protocols are available globally.

    "},"Structs.html":{"name":"Structures","abstract":"

    The following structures are available globally.

    "}} \ No newline at end of file +{"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging012SwiftLogNoOpC7HandlerVACycfc":{"name":"init()","abstract":"

    Undocumented

    ","parent_name":"SwiftLogNoOpLogHandler"},"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging012SwiftLogNoOpC7HandlerVyACSScfc":{"name":"init(_:)","abstract":"

    Undocumented

    ","parent_name":"SwiftLogNoOpLogHandler"},"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata4file8function4lineyAA6LoggerV5LevelO_AL7MessageVSDySSAL13MetadataValueOGSgS2SSutF":{"name":"log(level:message:metadata:file:function:line:)","parent_name":"SwiftLogNoOpLogHandler"},"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","parent_name":"SwiftLogNoOpLogHandler"},"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","parent_name":"SwiftLogNoOpLogHandler"},"Structs/SwiftLogNoOpLogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","parent_name":"SwiftLogNoOpLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging16StreamLogHandlerV14standardOutput5labelACSS_tFZ":{"name":"standardOutput(label:)","abstract":"

    Factory that makes a StreamLogHandler to directs its output to stdout

    ","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging16StreamLogHandlerV13standardError5labelACSS_tFZ":{"name":"standardError(label:)","abstract":"

    Factory that makes a StreamLogHandler to directs its output to stderr

    ","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","parent_name":"StreamLogHandler"},"Structs/StreamLogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata6source4file8function4lineyAA6LoggerV5LevelO_AM7MessageVSDySSAM13MetadataValueOGSgS3SSutF":{"name":"log(level:message:metadata:source:file:function:line:)","parent_name":"StreamLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging19MultiplexLogHandlerVyACSayAA0cD0_pGcfc":{"name":"init(_:)","abstract":"

    Create a MultiplexLogHandler.

    ","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata6source4file8function4lineyAA6LoggerV5LevelO_AM7MessageVSDySSAM13MetadataValueOGSgS3SSutF":{"name":"log(level:message:metadata:source:file:function:line:)","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","parent_name":"MultiplexLogHandler"},"Structs/MultiplexLogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","parent_name":"MultiplexLogHandler"},"Structs/Logger/Message.html#/s:s26ExpressibleByStringLiteralP0cD4TypeQa":{"name":"StringLiteralType","parent_name":"Message"},"Structs/Logger/Message.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"Message"},"Structs/Logger/Message.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"Message"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO5traceyA2EmF":{"name":"trace","abstract":"

    Appropriate for messages that contain information normally of use only when","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO5debugyA2EmF":{"name":"debug","abstract":"

    Appropriate for messages that contain information normally of use only when","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO4infoyA2EmF":{"name":"info","abstract":"

    Appropriate for informational messages.

    ","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO6noticeyA2EmF":{"name":"notice","abstract":"

    Appropriate for conditions that are not error conditions, but that may require","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO7warningyA2EmF":{"name":"warning","abstract":"

    Appropriate for messages that are not error conditions, but more severe than","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO5erroryA2EmF":{"name":"error","abstract":"

    Appropriate for error conditions.

    ","parent_name":"Level"},"Structs/Logger/Level.html#/s:7Logging6LoggerV5LevelO8criticalyA2EmF":{"name":"critical","abstract":"

    Appropriate for critical error conditions that usually require immediate","parent_name":"Level"},"Structs/Logger/Level.html#/s:SL1loiySbx_xtFZ":{"name":"<(_:_:)","parent_name":"Level"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO6stringyAESScAEmF":{"name":"string(_:)","abstract":"

    A metadata value which is a String.

    ","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO17stringConvertibleyAEs012CustomStringF0_pcAEmF":{"name":"stringConvertible(_:)","abstract":"

    A metadata value which is some CustomStringConvertible.

    ","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO10dictionaryyAESDySSAEGcAEmF":{"name":"dictionary(_:)","abstract":"

    A metadata value which is a dictionary from String to Logger.MetadataValue.

    ","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:7Logging6LoggerV13MetadataValueO5arrayyAESayAEGcAEmF":{"name":"array(_:)","abstract":"

    A metadata value which is an array of Logger.MetadataValues.

    ","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s26ExpressibleByStringLiteralP0cD4TypeQa":{"name":"StringLiteralType","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s30ExpressibleByDictionaryLiteralP3KeyQa":{"name":"Key","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s30ExpressibleByDictionaryLiteralP5ValueQa":{"name":"Value","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s30ExpressibleByDictionaryLiteralP010dictionaryD0x3KeyQz_5ValueQztd_tcfc":{"name":"init(dictionaryLiteral:)","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s25ExpressibleByArrayLiteralP0cD7ElementQa":{"name":"ArrayLiteralElement","parent_name":"MetadataValue"},"Structs/Logger/MetadataValue.html#/s:s25ExpressibleByArrayLiteralP05arrayD0x0cD7ElementQzd_tcfc":{"name":"init(arrayLiteral:)","parent_name":"MetadataValue"},"Structs/Logger.html#/s:7Logging6LoggerV5labelSSvp":{"name":"label","abstract":"

    An identifier of the creator of this Logger.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV3log5level_8metadata6source4file8function4lineyAC5LevelO_AC7MessageVyXKSDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"log(level:_:metadata:source:file:function:line:)","abstract":"

    Log a message passing the log level as a parameter.

    ","parent_name":"Logger"},"Structs/Logger.html#/log(level:_:metadata:source:file:function:line:)":{"name":"log(level:_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV3log5level_8metadata4file8function4lineyAC5LevelO_AC7MessageVyXKSDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"log(level:_:metadata:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/log(level:_:metadata:file:function:line:)":{"name":"log(level:_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV11metadataKeyAC13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","abstract":"

    Add, change, or remove a logging metadata item.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8logLevelAC0D0Ovp":{"name":"logLevel","abstract":"

    Get or set the log level configured for this Logger.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5trace_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"trace(_:metadata:source:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/trace(_:metadata:source:file:function:line:)":{"name":"trace(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5trace_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"trace(_:metadata:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/trace(_:metadata:file:function:line:)":{"name":"trace(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5debug_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"debug(_:metadata:source:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/debug(_:metadata:source:file:function:line:)":{"name":"debug(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5debug_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"debug(_:metadata:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/debug(_:metadata:file:function:line:)":{"name":"debug(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV4info_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"info(_:metadata:source:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/info(_:metadata:source:file:function:line:)":{"name":"info(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV4info_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"info(_:metadata:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/info(_:metadata:file:function:line:)":{"name":"info(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV6notice_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"notice(_:metadata:source:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/notice(_:metadata:source:file:function:line:)":{"name":"notice(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV6notice_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"notice(_:metadata:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/notice(_:metadata:file:function:line:)":{"name":"notice(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV7warning_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"warning(_:metadata:source:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/warning(_:metadata:source:file:function:line:)":{"name":"warning(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV7warning_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"warning(_:metadata:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/warning(_:metadata:file:function:line:)":{"name":"warning(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5error_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"error(_:metadata:source:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/error(_:metadata:source:file:function:line:)":{"name":"error(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5error_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"error(_:metadata:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/error(_:metadata:file:function:line:)":{"name":"error(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8critical_8metadata6source4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKSSSgyXKS2SSutF":{"name":"critical(_:metadata:source:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/critical(_:metadata:source:file:function:line:)":{"name":"critical(_:metadata:source:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8critical_8metadata4file8function4lineyAC7MessageVyXK_SDySSAC13MetadataValueOGSgyXKS2SSutF":{"name":"critical(_:metadata:file:function:line:)","abstract":"

    Undocumented

    ","parent_name":"Logger"},"Structs/Logger.html#/critical(_:metadata:file:function:line:)":{"name":"critical(_:metadata:file:function:line:)","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV8Metadataa":{"name":"Metadata","abstract":"

    Metadata is a typealias for [String: Logger.MetadataValue] the type of the metadata storage.

    ","parent_name":"Logger"},"Structs/Logger/MetadataValue.html":{"name":"MetadataValue","abstract":"

    A logging metadata value. Logger.MetadataValue is string, array, and dictionary literal convertible.

    ","parent_name":"Logger"},"Structs/Logger/Level.html":{"name":"Level","abstract":"

    The log level.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5labelACSS_tcfc":{"name":"init(label:)","abstract":"

    Construct a Logger given a label identifying the creator of the Logger.

    ","parent_name":"Logger"},"Structs/Logger.html#/s:7Logging6LoggerV5label7factoryACSS_AA10LogHandler_pSSXEtcfc":{"name":"init(label:factory:)","abstract":"

    Construct a Logger given a label identifying the creator of the Logger or a non-standard LogHandler.

    ","parent_name":"Logger"},"Structs/Logger/Message.html":{"name":"Message","abstract":"

    Logger.Message represents a log message’s text. It is usually created using string literals.

    ","parent_name":"Logger"},"Structs/Logger.html":{"name":"Logger","abstract":"

    A Logger is the central type in SwiftLog. Its central function is to emit log messages using one of the methods"},"Structs/MultiplexLogHandler.html":{"name":"MultiplexLogHandler","abstract":"

    A pseudo-LogHandler that can be used to send messages to multiple other LogHandlers.

    "},"Structs/StreamLogHandler.html":{"name":"StreamLogHandler","abstract":"

    StreamLogHandler is a simple implementation of LogHandler for directing"},"Structs/SwiftLogNoOpLogHandler.html":{"name":"SwiftLogNoOpLogHandler","abstract":"

    No operation LogHandler, used when no logging is required

    "},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata6source4file8function4lineyAA6LoggerV5LevelO_AM7MessageVSDySSAM13MetadataValueOGSgS3SSutF":{"name":"log(level:message:metadata:source:file:function:line:)","abstract":"

    This method is called when a LogHandler must emit a log message. There is no need for the LogHandler to","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP3log5level7message8metadata4file8function4lineyAA6LoggerV5LevelO_AL7MessageVSDySSAL13MetadataValueOGSgS2SSutF":{"name":"log(level:message:metadata:file:function:line:)","abstract":"

    SwiftLog 1.0 compatibility method. Please do not implement, implement","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP11metadataKeyAA6LoggerV13MetadataValueOSgSS_tcip":{"name":"subscript(metadataKey:)","abstract":"

    Add, remove, or change the logging metadata.

    ","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP8metadataSDySSAA6LoggerV13MetadataValueOGvp":{"name":"metadata","abstract":"

    Get or set the entire metadata storage as a dictionary.

    ","parent_name":"LogHandler"},"Protocols/LogHandler.html#/s:7Logging10LogHandlerP8logLevelAA6LoggerV0E0Ovp":{"name":"logLevel","abstract":"

    Get or set the configured log level.

    ","parent_name":"LogHandler"},"Protocols/LogHandler.html":{"name":"LogHandler","abstract":"

    A LogHandler is an implementation of a logging backend.

    "},"Enums/LoggingSystem.html#/s:7Logging0A6SystemO9bootstrapyyAA10LogHandler_pSScFZ":{"name":"bootstrap(_:)","abstract":"

    bootstrap is a one-time configuration function which globally selects the desired logging backend","parent_name":"LoggingSystem"},"Enums/LoggingSystem.html":{"name":"LoggingSystem","abstract":"

    The LoggingSystem is a global facility where the default logging backend implementation (LogHandler) can be"},"Enums.html":{"name":"Enumerations","abstract":"

    The following enumerations are available globally.

    "},"Protocols.html":{"name":"Protocols","abstract":"

    The following protocols are available globally.

    "},"Structs.html":{"name":"Structures","abstract":"

    The following structures are available globally.

    "}} \ No newline at end of file diff --git a/docs/current/Logging/undocumented.json b/docs/current/Logging/undocumented.json index a7088ad..6ccb8d3 100644 --- a/docs/current/Logging/undocumented.json +++ b/docs/current/Logging/undocumented.json @@ -1,6 +1,124 @@ { "warnings": [ - + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 121, + "symbol": "Logger.log(level:_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 190, + "symbol": "Logger.trace(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 221, + "symbol": "Logger.trace(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 256, + "symbol": "Logger.debug(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 288, + "symbol": "Logger.debug(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 323, + "symbol": "Logger.info(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 356, + "symbol": "Logger.info(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 391, + "symbol": "Logger.notice(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 428, + "symbol": "Logger.notice(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 462, + "symbol": "Logger.warning(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 495, + "symbol": "Logger.warning(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 530, + "symbol": "Logger.error(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 563, + "symbol": "Logger.error(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 597, + "symbol": "Logger.critical(_:metadata:source:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 633, + "symbol": "Logger.critical(_:metadata:file:function:line:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 1160, + "symbol": "SwiftLogNoOpLogHandler.init()", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + }, + { + "file": "/code/Sources/Logging/Logging.swift", + "line": 1162, + "symbol": "SwiftLogNoOpLogHandler.init(_:)", + "symbol_kind": "source.lang.swift.decl.function.method.instance", + "warning": "undocumented" + } ], "source_directory": "/code" } \ No newline at end of file