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

All logs #84

Open
Alival-IT opened this issue Jul 2, 2021 · 4 comments
Open

All logs #84

Alival-IT opened this issue Jul 2, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Alival-IT
Copy link

Hello, is it possible to share all the logs from device? not just the logged one throught timber but from logcat

@pandulapeter
Copy link
Owner

pandulapeter commented Jul 2, 2021

Sounds useful, thanks for the idea! Note to self

Let me think about how to best expose this functionality using the library, I'll definitely look into it and keep you updated.

In the mean time you might be able to hack some extra, custom data into the "build information" section of the bug reporting screen, but I'd be careful with Strings that are too long.

Beagle.initialize(
    application = application,
    behavior = Behavior(
        ...
        bugReportingBehavior = Behavior.BugReportingBehavior(
            ...
            buildInformation = {
                listOf(
                    "Version name".toText() to versionName,
                    "Custom information" to "Anything"
                )
            }
        )
    )
)

Edit: on second thought, yeah, a simple file in the bugreport for the logcat going back N minutes would be great, I'll see what I can do

@pandulapeter pandulapeter self-assigned this Jul 2, 2021
@pandulapeter pandulapeter added the enhancement New feature or request label Jul 2, 2021
@Alival-IT
Copy link
Author

Alival-IT commented Apr 28, 2022

@pandulapeter Hello there, any updates on this topic?

Also I see that every log I select to share, is in a separate txt file, result in a huge list of txt files sometimes with 1 line

this is my logger enabler

    enum class LogLabels(val label: String) {
        a("a"),
        b("b"),
        c("c")
    }
....



            behavior = Behavior(
                logBehavior = Behavior.LogBehavior(
                    loggers = listOf(BeagleLogger),
                ),
                bugReportingBehavior = Behavior.BugReportingBehavior(
                    logLabelSectionsToShow = listOf(null, *LogLabels.values().map { it.label }.toTypedArray()),
                    lifecycleSectionEventTypes = emptyList(),
                    buildInformation = {
                        listOf(
                            "Version name".toText() to context.getCurrentVersionName(),
                            "Version code".toText() to context.getCurrentVersionCode().toString(),
                            "Application ID".toText() to context.applicationContext.packageName
                        )
                    }
                ),
                networkLogBehavior = Behavior.NetworkLogBehavior(
                    networkLoggers = listOf(BeagleOkHttpLogger)
                )
            )

Screenshot 2022-04-28 at 09 23 23

@pandulapeter
Copy link
Owner

@alivDev1 Sorry for kindof forgetting about this issue.

Revisiting the topic: exporting all logcat messages into a file is not something the library should provide in my opinion. If anybody needs that functionality, they should implement it on their own and simply add a TextModule to Beagle to execute that piece of logic.

On the other hand Beagle's Bug Report screen creating those many files is admittedly not ideal. That definitely is something I should improve, so let me keep this issue open. Sorry that I can't give you an estimate, it's a bigger undertaking.

@Alival-IT
Copy link
Author

No problem at all, thanks for response 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants