Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve our logging system #4351

Closed
7 tasks
manuroe opened this issue May 26, 2021 · 0 comments
Closed
7 tasks

Improve our logging system #4351

manuroe opened this issue May 26, 2021 · 0 comments

Comments

@manuroe
Copy link
Member

manuroe commented May 26, 2021

We need to have a more advanced logging system than the basic NSLog() in MatrixSDK, MatrixKit, Element-iOS where:

  • We have classic debug levels like verbose, debug, warn, error. We can use debug() everywhere during the transition step and affine latter.
  • We continue to log to files (those files are sent to the rageshake server):
    • log files dedicated to the app and to every extension (Siri, sharing, notification service)
    • a file per life cycle
  • We need to keep the same kind of circular log system as today where we can select the max number of log files (like 50) and their max size (like 100MB)
  • We can select logging output at build time and runtime: to file, to device console, to both or to none (disable logs)
  • Log output is very similar to the current NSLog output. We need timestamp and thread id.
  • Improve logging by module. We currently use this pattern : NSLog(@"[MyClass] xxxx") to separate them. This is boring to repeat [MyClass] on every log
  • It should be implemented in swift but usable from objc. We could have a bridge object between objc and the final swift tool to avoid to loose swift power when we are all full swift.

We should have a weak dependency on the logging lib we will use. We could probably reuse the MXLogger object.

stefanceriu added a commit to matrix-org/matrix-ios-kit that referenced this issue Jun 2, 2021
stefanceriu added a commit to matrix-org/matrix-ios-kit that referenced this issue Jun 2, 2021
stefanceriu added a commit that referenced this issue Jun 2, 2021
stefanceriu added a commit that referenced this issue Jun 3, 2021
…g() and replaced more print() usages with MXLog.debug()
stefanceriu added a commit that referenced this issue Jun 3, 2021
* Adopted the new MXLog and replaced NSLog throughout the application - /issues/4351
* Replaced NSLog() and print() usages with MXLog.debug()
* Added swiftlint rules for NSLog(), print(), println() and os_log()
* Escape paths used to run script build phases for swiftlint and swiftgen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants