/
Launch Apollo Studio


STRUCT

CodegenLogger

public struct CodegenLogger

Helper to get logs printing to stdout so they can be read from the command line.

Methods

log(_:logLevel:file:line:)

public static func log(_ logString: @autoclosure () -> String,
                       logLevel: LogLevel = .debug,
                       file: StaticString = #file,
                       line: UInt = #line)

Logs the given string if its logLevel is at or above CodegenLogger.level, otherwise ignores it.

  • Parameter logString: The string to log out, as an autoclosure
  • Parameter logLevel: The log level at which to print this specific log. Defaults to debug.
  • Parameter file: The file where this function was called. Defaults to the direct caller.
  • Parameter line: The line where this function was called. Defaults to the direct caller.

Parameters

NameDescription
logStringThe string to log out, as an autoclosure
logLevelThe log level at which to print this specific log. Defaults to debug.
fileThe file where this function was called. Defaults to the direct caller.
lineThe line where this function was called. Defaults to the direct caller.
Edit on GitHub