Skip to content

Commit 2ce1bfd

Browse files
committed
Enhance the visual2 test
1 parent 50f28c1 commit 2ce1bfd

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

Tests/CLTLoggerTests/CLTLoggerTests.swift

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,22 @@ final class CLTLoggerTests : XCTestCase {
6767

6868
var logger = Logger(label: "my logger")
6969
logger.logLevel = .trace
70-
logger.trace( "trace: Example of text at this level. Isn’t it amazing?")
71-
logger.debug( "debug: Example of text at this level. Isn’t it amazing?")
72-
logger.info( "info: Example of text at this level. Isn’t it amazing?")
73-
logger.notice( "notice: Example of text at this level. Isn’t it amazing?")
74-
logger.warning( "warning: Example of text at this level. Isn’t it amazing?")
75-
logger.error( "error: Example of text at this level. Isn’t it amazing?")
76-
logger.critical("critical: Example of text at this level. Isn’t it amazing?")
70+
71+
CLTLogger.write(Data("\n".utf8), to: .standardError)
72+
73+
logger.trace( "trace: Example of a log at this level. Isn’t it amazing?")
74+
logger.debug( "debug: Example of a log at this level. Isn’t it amazing?")
75+
logger.info( "info: Example of a log at this level. Isn’t it amazing?")
76+
logger.notice( "notice: Example of a log at this level. Isn’t it amazing?")
77+
logger.warning( "warning: Example of a log at this level. Isn’t it amazing?")
78+
logger.error( "error: Example of a log at this level. Isn’t it amazing?")
79+
logger.critical("critical: Example of a log at this level. Isn’t it amazing?")
80+
81+
CLTLogger.write(Data("\n".utf8), to: .standardError)
82+
83+
logger.info("An informational message with metadata.", metadata: ["component": "LoggerTester", "array-value": .array(["1", "2", "3"]), "dictionary-value": .dictionary(["key1": "value1", "key2": "value2", "key3": "value3"])])
84+
85+
CLTLogger.write(Data("\n".utf8), to: .standardError)
7786
}
7887

7988
func testVisual3() {

0 commit comments

Comments
 (0)