Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eafy/zjlog
Log redirection output tool for iOS, you can set the Log level, redirect output to the proxy interface, save logs to the sandbox, support for c、c++、m、mm code files, and more.
https://github.com/eafy/zjlog
c cplusplus log nslog oc printf
Last synced: 25 days ago
JSON representation
Log redirection output tool for iOS, you can set the Log level, redirect output to the proxy interface, save logs to the sandbox, support for c、c++、m、mm code files, and more.
- Host: GitHub
- URL: https://github.com/eafy/zjlog
- Owner: Eafy
- License: mit
- Created: 2018-07-04T09:20:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-01T06:46:16.000Z (11 months ago)
- Last Synced: 2024-10-10T20:16:42.349Z (26 days ago)
- Topics: c, cplusplus, log, nslog, oc, printf
- Language: Java
- Homepage:
- Size: 681 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZJLogSDK
Log redirection output tool for iOS, support for c、c++、m、mm code files.
[![CI Status](https://img.shields.io/travis/Eafy/ZJLog.svg?style=flat)](https://travis-ci.org/Eafy/ZJLog)
[![Version](https://img.shields.io/cocoapods/v/ZJLog.svg?style=flat)](https://cocoapods.org/pods/ZJLog)
[![License](https://img.shields.io/cocoapods/l/ZJLog.svg?style=flat)](https://cocoapods.org/pods/ZJLog)
[![Platform](https://img.shields.io/cocoapods/p/ZJLog.svg?style=flat)](https://cocoapods.org/pods/ZJLog)# Use Description
## Log Level
verbose > debug > info > warn > error
| parameter | level | description |
| :----------: | :------: | :---: |
| `ZJLOG_LEVEL_VERBOSE` | 0 | verbose |
| `ZJLOG_LEVEL_DEBUG` | 1 | debug |
| `ZJLOG_LEVEL_INFO` | 2 | info |
| `ZJLOG_LEVEL_WARN` | 3 | warn |
| `ZJLOG_LEVEL_ERROR` | 4 | error |
## ZJLog Setting API
- `+setLogOFF`
Turn off log output, default on.
- `+setLevel:`
Setting the log level, default verbose.- `+setDelegate:`
Setting delegate: ZJLogDelegate for didReceiveLogString.
- `+saveLog:`
Switch for save log to sandbox.
## Use Print API
### For OC
`#import `
`CLog(@"This is a log1");`
`CLog(@"This is a log2:%@", @"Hello World!");`
### For C、C++
`#include `
`CPrintf("This is a log for debug")`
`CPrintfV("This is a log for verbose")`
`CPrintfD("This is a log for debug")`
`CPrintfI("This is a log for info")`
`CPrintfW("This is a log for warn")`
`CPrintfE("This is a log for error")`