Protocole <GCKLoggerDelegate>
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Le protocole de délégation GCKLogger.
Hérite de <NSObjectNSObject>.
- (void) logFromFunction: |
|
(const char *) |
function |
message: |
|
(NSString *) |
message |
|
|
| |
|
optional |
- (void) logMessage: |
|
(NSString *) |
message |
fromFunction: |
|
(NSString *) |
function |
|
|
| |
|
optional |
Enregistre un message.
- Parameters
-
function | The calling function, normally obtained from __func__ . |
message | The log message. |
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2022/12/06 (UTC).
[null,null,["Dernière mise à jour le 2022/12/06 (UTC)."],[[["\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. |"]]