Skip to content

Super Log brings a new logging mechanism for Android Apps. It provides the functionality of displaying logs in the app itself. User can mail the logs to any email address for further use.

License

Notifications You must be signed in to change notification settings

groverankush/SuperLog

Repository files navigation

SuperLog

Open Source Love License

SuperLog is a logger for Android Apps. It has always been a trouble to write logs in a file and console seperately. After Marshmallow apps need to ask for explicit permission for accessing file storage. Some apps demand file access but some doesn't. Creating an extra file to maintain logs forces developers to ask permission everytime. SuperLogs allows users to create console logs and persistent logs just with one statement. The logs generated by SuperLog can also be viewed in the app itself. It allows developers focussing on IoT or Android things apps to directly view the logs in the device itself. The logs genertaed by SuperLog can be mailed with developer's ease.

Getting Started

These are the all the instructions you need to use SuperLog in your apps.

Compile

Just a simple debug compile will get you up and running with SuperLog.

compile 'com.ankushgrover:SuperLog:2.0.0'

Initialize

It's preferable to initialize SuperLog in your application's onCreate() method.

SuperLog.init(new SuperLog.Builder()
                .setSuperLogViewVisibility(true), new ContextWrapper() {
            @Override
            public Context getContext() {
                return getApplicationContext();
            }
        });

Add View

After initialization you can simply add SuperLogView in any of your layout files. On clicking this view, you will be presented with all the logs created by SuperLog in a color coded format along with some extra functionality.

    <com.ankushgrover.superlog.views.SuperLogView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:textStyle="bold" />

Examples

You can use normal Log statements to carry out the functionality.

Log.d("TAG", "message"); // debug log
Log.v("TAG", "message"); // verbose log
Log.w("TAG", "message"); // warning log
Log.e("TAG", "message"); // error log

These statements will create logs in android monitor as well as save in persistent storage. Logs generated by these can be easily accessed by tapping SuperLogView.

Built With

  • Android SDK
  • Maven - Dependency Management

Author

Ankush Grover

License

This project is licensed under the Apache License, Version 2.0 - see the LICENSE.md file for details

Acknowledgments

About

Super Log brings a new logging mechanism for Android Apps. It provides the functionality of displaying logs in the app itself. User can mail the logs to any email address for further use.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages