Improve readability by extracting separate types to their own files#444
Conversation
|
We still have ~1000 LoC in |
|
Thanks for tackling this, @samuelmurray! The license headers check is failing because But another thing that bothers me for some reason is |
Yeah, you're right. I was a bit unsure where to put it, as it was referenced from |
…files Move StdioOutputStream to same file as StreamLogHandler, and extract related tests to separate file
|
@kukushechkin I had a typo in my commit message ("be" -> "by") - I'm not sure what ends up in the final commit message when you merge, but I didn't want to ammend/rebase during active review. Can you fix it when merging? |
|
Thank you @samuelmurray for this improvement! I've fixed "be" -> "by" in the merge commit. |
Improve readability be extracting separate types to their own files
Motivation:
Logger.swiftis >2000 LoC, which makes it hard to navigate both for contributors and users ofswift-log. Widely different concepts, such as concreteLogHandlerimplementations, are mixed with core types such asLogger.Level. Extracting separate types should make it easier to find what you are looking for.Closes #441
Modifications:
Logger-namespaced) types fromLogging.swiftto separate files.Logging.swifttoLogger.swift, as this is the only remaining top-level type.LoggingSystem.factoryfromfileprivatetointernalto be accessible fromLogger.swift.Result:
Each (non-private) top-level type lives in a separate file, named after the type.