<GCKLoggerDelegate> 协议
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
继承 <NSObjectNSObject>。
- (void) logFromFunction: |
|
(const char *) |
function |
message: |
|
(NSString *) |
message |
|
|
| |
|
optional |
- (void) logMessage: |
|
(NSString *) |
message |
fromFunction: |
|
(NSString *) |
function |
|
|
| |
|
optional |
记录消息。
- Parameters
-
function | The calling function, normally obtained from __func__ . |
message | The log message. |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-12-06。
[null,null,["最后更新时间 (UTC):2022-12-06。"],[[["\u003cp\u003eThe \u003ccode\u003eGCKLoggerDelegate\u003c/code\u003e protocol allows developers to customize the logging behavior of the Google Cast framework.\u003c/p\u003e\n"],["\u003cp\u003eIt provides two methods for logging messages: \u003ccode\u003elogFromFunction:message:\u003c/code\u003e (deprecated) and \u003ccode\u003elogMessage:fromFunction:\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003elogMessage:fromFunction:\u003c/code\u003e method is the preferred way to log messages and includes the message and the calling function.\u003c/p\u003e\n"],["\u003cp\u003eBoth methods are optional and can be implemented as needed by the delegate.\u003c/p\u003e\n"]]],["The GCKLoggerDelegate protocol, inheriting from NSObject, allows logging messages. It includes two instance methods: `logFromFunction:message:` and `logMessage:fromFunction:`. Both methods facilitate logging a message, with `logFromFunction:message:` being deprecated in favor of `logMessage:fromFunction:`. Each method takes two parameters, a message and the calling function, usually acquired via `__func__`. The log message should be provided as a string.\n"],null,["# <GCKLoggerDelegate> Protocol\n\n[Instance Methods](#pub-methods) \n\\\u003cGCKLoggerDelegate\\\u003e Protocol Reference \n\nOverview\n--------\n\nThe [GCKLogger](/cast/v3/reference/ios/interface_g_c_k_logger \"A singleton object used for logging by the framework. \") delegate protocol.\n\nInherits \\\u003cNSObjectNSObject\\\u003e.\n\n|--------|-------------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (void) | - [logFromFunction:message:](/cast/v3/reference/ios/protocol_g_c_k_logger_delegate-p#a9e1ae2c11ec338029f11a5beb08e6a02) |\n| | Logs a message. [More...](#a9e1ae2c11ec338029f11a5beb08e6a02) |\n| ||\n| (void) | - [logMessage:fromFunction:](/cast/v3/reference/ios/protocol_g_c_k_logger_delegate-p#a178ec6776f66bb879ccdece71c60b618) |\n| | Logs a message. [More...](#a178ec6776f66bb879ccdece71c60b618) |\n| ||\n\nMethod Detail\n-------------\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| |---------------------------|---|-----------------|------------| | - (void) logFromFunction: | | (const char \\*) | *function* | | message: | | (NSString \\*) | *message* | | | | | | | optional |\n\nLogs a message.\n\n**[Deprecated:](/cast/v3/reference/ios/deprecated#_deprecated000028)**\n: Use [logMessage:fromFunction:](/cast/v3/reference/ios/protocol_g_c_k_logger_delegate-p#a178ec6776f66bb879ccdece71c60b618 \"Logs a message. \") instead.\n\nParameters\n:\n\n |----------|--------------------------------------------|\n | function | The calling function, normally `__func__`. |\n | message | The log message. |\n\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| |----------------------|---|---------------|------------| | - (void) logMessage: | | (NSString \\*) | *message* | | fromFunction: | | (NSString \\*) | *function* | | | | | | | optional |\n\nLogs a message.\n\nParameters\n:\n\n |----------|----------------------------------------------------------|\n | function | The calling function, normally obtained from `__func__`. |\n | message | The log message. |"]]