Giter VIP home page Giter VIP logo

diagnostics's People

Contributors

amirdew avatar antranapp avatar avdlee avatar davidsteppenbeck avatar dilipptdr avatar edorphy avatar entunidotdeb avatar intitni avatar juliankahnert avatar kairadiagne avatar mariusc avatar mikakruschel avatar mikemee avatar pgorrindo avatar raphaelkoebraam avatar rubenfer avatar sairamkotha avatar wetransferplatform avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

diagnostics's Issues

Crash when trying to load the CSS

I added this framework to a demo app, and I am getting the following crash

        let bundle = Bundle(for: DiagnosticsLogger.self)
        let cssFile = bundle.url(forResource: "style", withExtension: "css")! // <- crash
        let css = try! String(contentsOf: cssFile, encoding: .utf8).minifiedCSS()

How to replicate the crash:
1- Create an iOS app
2- Use CocoaPods
3- just use the template code in the Readme

Build Reporter inside a closure

Hi!

I'm basically struggling for this issue, this is maybe a feature.

I'm trying to build a new DiagnosticsChapter which would call an Endpoint of my API and have it on its own for the report.

Do you have an input?

Best regards,
Romain

Encode Logging for HTML so object descriptions are visible

Would be useful to include object description strings in the logs, but it seems they aren't logged when passed as part of the message argument in the static func DiagnosticsLogger.log(message:).

For example, if I try to log self.description where self is of type UIViewController by calling DiagnosticsLogger.log(message: "This is the view controller description: \(self.description).") what I see in the log is something like "2020-01-27 16:00:00 | ViewController.swift:L100 | This is the view controller description: ."

Create a common structure to report diagnostics in

It would be really nice to add all kinds of logs to the diagnostics. Each app is different and needs to report different stuff.

Features to think of:

  • Create a new chapter of data
  • Add a dictionary of key-values to log

Support for iOS 10.0

Thanks for open sourcing Diagnostics.
Any specific reason for making it compatible for iOS 11 above?
I cloned and made minimum target as iOS 10.0 & I found only one error it is sortedKeys for json.
Do you mind if I raise PR to support for iOS 10 & above?

About assertionFailure

Is there necessary to use assertionFailure on unexpected condition at DiagnosticLogger.swift. May be use print more friendly.

Crash happening when there is no space left on the device

*** -[NSConcreteFileHandle writeData:]: No space left on device

This is happening inside the DiagnosticsLogger on line 146, inside the log method. This method can be called from many places.

We basically need to check whether there's enough space left to write the logs.

Question: Workaround for users who don't use Apple Mail

This is not a bug report but rather a question related to your project where I'm interested if you, or anyone else reading this, found a good workaround.

We are also using MFMailComposeViewController in our app to let users send feedback. However, we ran into the issue that when you don't use Apple Mail (I don't) you cannot use MFMailComposeViewController. canSendMail will return false in this case.

We will now probably just expose an endpoint in our backend to receive user feedback and don't use the builtin mail composer. However, we would prefer to stick to the current solution. Since this project is also heavily impacted by this, I would be curious if you also ran into this issue and might have a creative idea how to get around it.

Diagnostics.xcodeproj is Missing

I'm trying to update to the latest version of this library but the Diagnostics.xcodeproj file is missing from the repo. Was this deliberate? If so can the installation instructions be updated please?

Support different platforms/APIs

👋 Love the idea of this project.

I was wondering would you be open to the idea of support sending these via other channels other than email?

I was thinking maybe supporting a pluggable API to support different APIs for reporting issues.

Happy to explore the idea and open a PR but wanted to see if it was inline with your vision for this?

Create default logs to add

As a start, it would be great to have a basic logging approach. Simply add the framework and call the method for creating the email and the HTML report should already contain basic stuff.

Things to include:

  • Device information
  • UserDefaults
  • Crash information
  • Reported errors
  • App metadata
  • App name as title of the HTML file

Ideally, it would be possible to opt-out for specific things using an enum in the configuration file.

Support for Apple Watch App Logs

Hi,

I'm starting to use this library in my app and I think it's pretty sweet! I extended the Diagnostic Logger piece to also support Apple Watch app logs by writing a log file on the watch and periodically transferring the file over to the iPhone, where it can be included in a report alongside the iPhone logs.

Is that something ya'll would want me to put up a PR for? Just figured I would ask first.

Thanks,

  • Conrad

Include device product names

I thought it might be convenient to include something that contains device product names so what appears in the final report is more understandable - for example, we'd see:

Device iPhone12,1 (iPhone 11)

rather than just:

Device iPhone12,1

in the attached HTML file. Would probably be enough to just include the most recent iPhones for now, to keep it compact. Devices not included would just display as they are currently.

Only Include Subset of Logs

Hi there, loving using the library, but had a question about how to provide less data. Every time a user sends me their diagnostics, they're sending me diagnostics for every session they've ever had. This makes parsing the report cumbersome and unnecessarily large.

I was wondering if it'd be possible to have an option to receive only the last N session logs, via some sort of API in Diagnostics.

Thanks a lot!

Is it possible to separate Custom Logs & System Logs

Hi Guys,

As far as I have tried there is no way to separate the custom log messages which are clubbed together in automatically created logs.

So is it possible to create a separate report for the Custom Logs ? As the "SYSTEM:" prefixed logs have too much debug prints from different frameworks that I don't want.

I also tried the filtering for the report, but the logs report is just on big string.

Let me know if I missing something that I haven't tried 😅

Add support for users without the Apple Mail app

If you don't have the Apple Mail app installed, the MFMailComposeViewController does nothing and reporting an issue might not work.

For implementers of this framework, it would be really useful to have an easy way of presenting an email with support for 3rd party mail clients as well.

[Reports] Smart reporting

be smart about reporting what is likely happening. E.g.: “This might be caused because the user user was low on storage” or “This error happened in the user’s latest session: ”

Ideas for Transfer apps:

  • this might be a stretch, but is it possible to be able to see if the user closed the app during upload? or just closed/exited it at all?
  • Upload failure reasons

No public read access to var `DiagnosticsLogger.standard.isSetup`

There is currently no public read access to var DiagnosticsLogger.standard.isSetup (file DiagnosticsLogger.swift line 40), which could be useful when developing and debugging. I suggest adding public read access using:

/// Whether the logger is setup and ready to use.
public static func isSetUp() -> Bool {
    return standard.isSetup
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.