Skip to content

Instantly share code, notes, and snippets.

@fitomad fitomad/adapter_loggers.swift Secret
Created Apr 8, 2020

Embed
What would you like to do?
public class WebLogger
{
/**
Envía el texto al servidor mediante
una petición HTTP
*/
public func post(_ message: String) -> Void
{
print("POST /logging \(message)")
}
}
public class CoreDataLogger
{
/**
Inserta un registro en la base
de datos manejada por Core Data
*/
public func insert(_ message: String) -> Void
{
print("INSERT INTO LOG \(message)" )
}
}
public class FileLogger
{
/**
Escribe en el sistema de archivos
del dispositivo
*/
public func write(_ message: String) -> Void
{
print("APPEND \(message)")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.