├── .gitignore ├── usr └── lib │ └── libmessagelog.dylib ├── control ├── Makefile ├── MessageLog.h ├── .travis.yml ├── README.md └── MessageLog.xm /.gitignore: -------------------------------------------------------------------------------- 1 | packages 2 | .theos 3 | -------------------------------------------------------------------------------- /usr/lib/libmessagelog.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Muirey03/MessageLog/HEAD/usr/lib/libmessagelog.dylib -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.muirey03.messagelog 2 | Name: MessageLog 3 | Depends: mobilesubstrate 4 | Version: 1.0.0 5 | Architecture: iphoneos-arm 6 | Description: A simple library to log all objc_msgSend calls 7 | Maintainer: Muirey03 8 | Author: Muirey03 9 | Section: Tweaks 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | export ARCHS = arm64 armv7 arm64e 2 | 3 | include $(THEOS)/makefiles/common.mk 4 | 5 | LIBRARY_NAME = libmessagelog 6 | libmessagelog_FILES = MessageLog.xm 7 | libmessagelog_LIBRARIES = substrate 8 | ADDITIONAL_CFLAGS = -DTHEOS_LEAN_AND_MEAN 9 | 10 | include $(THEOS_MAKE_PATH)/library.mk 11 | 12 | internal-stage:: 13 | mkdir -p usr/lib 14 | cp $(THEOS_STAGING_DIR)/usr/lib/libmessagelog.dylib usr/lib/libmessagelog.dylib 15 | -------------------------------------------------------------------------------- /MessageLog.h: -------------------------------------------------------------------------------- 1 | #ifndef MESSAGE_LOG_H 2 | #define MESSAGE_LOG_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #else 7 | #include 8 | #endif 9 | 10 | typedef void (*MLLoggerFunc_t)(bool, const char*, const char*); 11 | // Set a custom logging function to use instead of the default 12 | void MLSetLogger(MLLoggerFunc_t logger); 13 | 14 | // Enable/disable logging of every selector on every class 15 | void MLSetFullLoggingEnabled(bool enabled); 16 | 17 | typedef NS_ENUM(NSInteger, MLMethodType) 18 | { 19 | MLMethodTypeAny, 20 | MLMethodTypeClass, 21 | MLMethodTypeInstance 22 | }; 23 | // Enable selective logging 24 | void MLEnableSelectiveLogging(MLMethodType type, const char* classRegex, const char* selectorRegex); 25 | 26 | // Disable selective logging 27 | void MLDisableSelectiveLogging(void); 28 | 29 | // Log methods called by a block of code 30 | void MLLogBlock(void(^block)(void)); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif //MESSAGE_LOG_H 37 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | os: osx 2 | language: objective-c 3 | osx_image: xcode10.1 4 | sudo: false 5 | env: 6 | global: 7 | - THEOS=~/theos 8 | before_install: 9 | - brew install dpkg ldid 10 | - git clone --recursive git://github.com/theos/theos.git ~/theos 11 | script: 12 | - make clean package FINALPACKAGE=1 13 | before_deploy: 14 | - git config --local user.name "Muirey03" 15 | - git config --local user.email "tommy.muir@btinternet.com" 16 | - export RELEASE_PKG_FILE=$(ls ./packages/*.deb) 17 | - export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)} 18 | - git tag $TRAVIS_TAG 19 | deploy: 20 | provider: releases 21 | skip_cleanup: true 22 | api_key: 23 | secure: EeRHLS7Chwm5+oHGqBoNPbCZZnemm19qnO4QwvVV/43A2F0IZ+QIdCwuyyfm/OUsTfarbIKA2okHQMiBOXImudvUWTA8lojxMyeJXnVvhByVBDWXnwLYkfeAsazb8ypVBKlgs8B+X4dxWXnhrenMAyoBigDZkcD3CSeMRsIhi64uF+zfJZ4yvUmdHq9Iz+x9lc8DaWahFe88J2IIQ0nDQQGPNvZXErG+PFEQuZjou9D6VfgO8nM0bp/ZNJzbkP8o1dI9a441sBzLkfwjWRnY5Gg1XDDmnSzpHd8bZydIeQybJTyg2FDrgMs4eP7RgDpyIB3j0Hi0/BHI37b2UW5Qx4x2tkZ+JZN/W1fT/fhZ77RCmRSUXSCsVkh69LKwQAWjnVN2oBnJ1IuO5oaxUl5RMe+v+pHhfN3cpaW64AqItF7/b85yob2no9tC8JSolmbWonjSgIDqtO2Kg95lm02yRhc+fEi3LNbFFGu0EcotbGJkxt7wRXrBsc4+ISE2ER+a7wJjhDLaxIRtDt/0WtlGs80C6pMvHEN6cprs16I6I5vAkr4azV2EVOxtE8axKHrvC5Mg9Z76h4g2jAn888NvYXSK8caZj9cMaIYx9KmAFBcXOqSuNHfphGfedIYKW4m5KIMaPWrZJhP6f/ItS+Sp0BXf7AkurylhhkGeEgYQN/Y= 24 | file_glob: true 25 | file: "${RELEASE_PKG_FILE}" 26 | on: 27 | repo: Muirey03/MessageLog 28 | branch: master 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MessageLog 2 | ### A simple library to log all objc_msgSend calls 3 | 4 | MessageLog is a small library to log Objective-C method calls. It can be used to either log all messages, or to filter messages based off regular expressions, and even to implement your own logging functions. The default log location is `/tmp/MessageLog/objcMessages~_