All Projects → JungleCandy → Loggingprint

JungleCandy / Loggingprint

Licence: mit
Swift logging only when in Debug mode.

Programming Languages

swift
15916 projects
swift4
162 projects
swift3
66 projects

Labels

Projects that are alternatives of or similar to Loggingprint

Mex Vocabulary
MEX Vocabulary: a lightweight machine learning interchange format
Stars: ✭ 19 (+35.71%)
Mutual labels:  logging
Logger
HTTP middleware for Go that logs web requests to an io.Writer.
Stars: ✭ 24 (+71.43%)
Mutual labels:  logging
Pylogging
🏉 Python Logging Library
Stars: ✭ 9 (-35.71%)
Mutual labels:  logging
Thoth
An Error Logger for Go
Stars: ✭ 22 (+57.14%)
Mutual labels:  logging
Yii2 Slack Log
Pretty Slack log target for Yii 2
Stars: ✭ 24 (+71.43%)
Mutual labels:  logging
Python Json Logger
Json Formatter for the standard python logger
Stars: ✭ 931 (+6550%)
Mutual labels:  logging
Jslogger
Integrate JavaScript Logging with ASP.NET Core Logging APIs
Stars: ✭ 19 (+35.71%)
Mutual labels:  logging
Trail
Trail is a simple logging system for Java and Android. Create logs using the same API and the library will detect automatically in which platform the code is running.
Stars: ✭ 13 (-7.14%)
Mutual labels:  logging
Liblog
LibLog is a single file for you to either copy/paste or install via nuget, into your library/framework/application to provide a logging abstraction.
Stars: ✭ 925 (+6507.14%)
Mutual labels:  logging
Wufei
Async Kuberenetes Namespace Log Recorder / Streamer
Stars: ✭ 27 (+92.86%)
Mutual labels:  logging
Sls Logrus Hook
Logrus hook for aliyun sls
Stars: ✭ 23 (+64.29%)
Mutual labels:  logging
Znetcs.aspnetcore.logging.entityframeworkcore
This is Entity Framework Core logger and logger provider. A small package to allow store logs in any data store using Entity Framework Core.
Stars: ✭ 24 (+71.43%)
Mutual labels:  logging
Discord Scripts
A collection of scripts to enhance your Discord experience.
Stars: ✭ 26 (+85.71%)
Mutual labels:  logging
Lumberjack
Web based log viewer for Erlang and Elixir applications
Stars: ✭ 22 (+57.14%)
Mutual labels:  logging
Fluentd
Log shipping mechanism for Deis Workflow
Stars: ✭ 10 (-28.57%)
Mutual labels:  logging
Sysmontools
Utilities for Sysmon
Stars: ✭ 903 (+6350%)
Mutual labels:  logging
Phildb
Timeseries database
Stars: ✭ 25 (+78.57%)
Mutual labels:  logging
Eliot
Eliot: the logging system that tells you *why* it happened
Stars: ✭ 874 (+6142.86%)
Mutual labels:  logging
Logger Telegram Backend
A logger backend for Telegram
Stars: ✭ 13 (-7.14%)
Mutual labels:  logging
Command Bus
Java implementation of the Command-Bus pattern for Spring and CDI
Stars: ✭ 26 (+85.71%)
Mutual labels:  logging

LoggingPrint

Swift convenience functions for outputting to the console only when the build setting for "Active Complilation Conditions" (SWIFT_ACTIVE_COMPILATION_CONDITIONS) defines DEBUG

Two methods are provided.

  • loggingPrint() stands in for the print() function.
  • loggingDump() stands in for the dump() function.

For loggingPrint() the textual representation is obtained from the object using String(reflecting:) which works for any type. To provide a custom format for the output make your object conform to CustomDebugStringConvertible and provide your format in the debugDescription parameter.

For loggingDump() pass in the value to be dumped, and an optional string to act as a label that describes what is being dumped

Through the magic of default function parameter values, the output for each function contains:

  • Whether the call is being made on the UI or a background thread.
  • The name of the file.
  • The name of the function
  • The line number where the print statement is located.

Requirements

The latest version requires Swift 3.x and Xcode 8.

Usage

The same way as you would use a print() statement, or a dump() statement.

Installation

Just add the file to your project, and define DEBUG in your project's Active Complilation Conditions setting.

OR if you are using Carthage add this to your Cartfile

github "JungleCandy/LoggingPrint" >= 2.0

then drag the LoggingPrint.swift file out of the Checkouts folder and into your project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].