 /// - Parameters:
 ///   - domain: the domain this logging function occurs in
 ///   - message: log message
-///   - level: log level (defaults to `level_debug`)
-public func g_log(domain: String, _ message: String, level: LogLevelFlags = .level_debug) {
+///   - level: log level (defaults to `.debug`)
+public func g_log(domain: String, _ message: String, level: LogLevelFlags = .debug) {
     message.utf8CString.withUnsafeBufferPointer {
         guard let base = $0.baseAddress else { return }
         let varargs = [OpaquePointer(base)]
         withVaList(varargs) {
-            g_logv(domain, level, "%s", $0)
+            g_logv(domain, level.value, "%s", $0)
         }
     }
 }

    withUnsafeMutableBytes(of: &buffer) {
        guard let buffer = $0.baseAddress else { return }
        let msg = buffer.assumingMemoryBound(to: CChar.self)
        g_logv(nil, level, msg, CVaListPointer(_fromUnsafeMutablePointer: buffer))
    }
}


///   - domain: the domain this logging occurs in (defaults to `nil`)
public func g_warning(_ message: String, domain: String? = nil) {
    if let d = domain {
        g_log(domain: d, message, level: .warning)
    } else {
        g_log(message, level: .warning)
    }
}
