mirror of
https://github.com/apple/swift-log
synced 2026-11-30 04:18:44 +00:00
motivation: add tests to confirm desired functionality changes: * add property for logger metadata (aka context) * improve pretty-metadata (aka pretty-context) generation * add unit tests covering local and global use cases * add [test only] implementation of MDC * format with swiftformat open issues: * should we name the new property metadata or context * should we include a default MDC implmentation as part of the logging API. if we dont, we will encourage libraries binding to specific logging implementations that support it (that was bad in java) * tests are a bit brittle * why is ExampleLoggerImplementation a reference type?
29 lines
925 B
Swift
29 lines
925 B
Swift
// swift-tools-version:4.2
|
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "ServerLoggerAPI",
|
|
targets: [
|
|
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
|
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
|
|
.target(
|
|
name: "ServerLoggerAPI",
|
|
dependencies: []
|
|
),
|
|
.target(
|
|
name: "TestApp",
|
|
dependencies: ["ServerLoggerAPI", "ExampleLoggerImpl"]
|
|
),
|
|
.target(
|
|
name: "ExampleLoggerImpl",
|
|
dependencies: ["ServerLoggerAPI"]
|
|
),
|
|
.testTarget(
|
|
name: "LoggerAPITests",
|
|
dependencies: ["ServerLoggerAPI", "ExampleLoggerImpl"]
|
|
),
|
|
]
|
|
)
|