คลาส GCKLogger
ออบเจ็กต์เดี่ยวที่ใช้สําหรับการบันทึกโดยเฟรมเวิร์ก
หากมีผู้รับมอบสิทธิ์ ระบบจะส่งข้อความบันทึกที่มีการจัดรูปแบบไปยังผู้รับมอบสิทธิ์ ไม่เช่นนั้น ข้อความจะเขียนโดยใช้ NSLog() ในเวอร์ชันแก้ไขข้อบกพร่องและจะถูกทิ้งไว้
โปรดดู GCKLoggerDelegate สําหรับโปรโตคอลการมอบสิทธิ์
รับค่า NSObject
- (void) logFromFunction: |
|
(const char *) |
function |
message: |
|
(NSString *) |
format |
, |
|
|
... |
|
|
| |
บันทึกข้อความ
- Parameters
-
function | The calling function, normally __func__ . |
format | The format string. |
ผู้รับมอบสิทธิ์ให้ส่งข้อความบันทึก
ตัวกรองที่ใช้กับข้อความบันทึก
- Since
- 3.0
แจ้งเพื่อเปิดหรือปิดใช้การบันทึก
เปิดโดยค่าเริ่มต้น
- Since
- 3.0
- (BOOL) fileLoggingEnabled |
|
readwritenonatomicassign |
แจ้งเพื่อเปิดหรือปิดใช้การบันทึกไฟล์
ปิดโดยค่าเริ่มต้น
- Since
- 3.1
- (NSUInteger) maxLogFileSize |
|
readwritenonatomicassign |
ขนาดสูงสุดของไฟล์บันทึกในหน่วยไบต์
ขั้นต่ําคือ 32 KiB หากค่าเป็น 0 ระบบจะใช้ขนาดสูงสุดเริ่มต้นคือ 2 MiB
- Since
- 3.1
- (NSUInteger) maxLogFileCount |
|
readwritenonatomicassign |
จํานวนไฟล์บันทึกสูงสุด
ขั้นต่ําคือ 2
- Since
- 3.1
ระดับการบันทึกขั้นต่ําที่จะบันทึก
- Since
- 3.0
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2022-12-06 UTC
[null,null,["อัปเดตล่าสุด 2022-12-06 UTC"],[[["GCKLogger is a singleton object used for logging within the framework, using NSLog() in debug builds or a delegate if assigned."],["It offers methods to log messages, control logging levels, and configure file logging."],["Developers can customize logging behavior by setting a delegate, filter, and minimum logging level."],["GCKLogger provides properties to enable/disable logging, control file logging size and count."]]],["The GCKLogger, a singleton object, manages framework logging. It directs formatted log messages to a delegate or uses NSLog() in debug builds. Key actions include retrieving the singleton instance via `sharedInstance`, and logging messages using `logFromFunction:message:`. Properties control logging behavior: `delegate`, `filter`, `loggingEnabled`, `fileLoggingEnabled`, `maxLogFileSize`, `maxLogFileCount`, and `minimumLevel`. These allow setting a message receiver, applying a filter, enabling/disabling logging, managing file logging, setting log file limits, and setting the minimum logging level.\n"]]