Skip to content

Instantly share code, notes, and snippets.

@clmntcrl
Last active August 29, 2015 14:12
Show Gist options
  • Save clmntcrl/6b4508cf2a326bfb0043 to your computer and use it in GitHub Desktop.
Save clmntcrl/6b4508cf2a326bfb0043 to your computer and use it in GitHub Desktop.
Building Echo customizable log format #3. Full post: http://clmntcrl.io/blog/building-echo-customizable-log-format/.
enum EchoComponent {
case Datetime
case Flag
case Filename
case Function
case Line
case Message
case Separator(String)
}
struct Echo {
var format: [EchoComponent] = [
.Flag,
.Separator(" ["),
.Datetime,
.Separator("] ["),
.Filename,
.Separator(":"),
.Line,
.Separator("] "),
.Message
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment