在android中,我在哪里可以找到日志文件,特别是默认联系人应用程序崩溃时的日志文件?为什么我的联系人应用程序崩溃了?

时间:2014-03-13 14:58:39

标签: android carddav

尝试使用CardDAV Sync同步一个egroupware实例与android v4的联系人,"联系人"如果我尝试添加/更改CardDAV组的联系人,应用程序崩溃。

CardDAV Sync包含一个登录系统,它给我以下结果:

20140313T130816Z V org.dmfs.syncadapter.SyncAdapter background data setting: null background data value:true
20140313T130816Z V org.dmfs.syncadapter.SyncAdapter network type: 1 newtork subtype: 0 is connected: true is available: true
20140313T130816Z V org.dmfs.syncadapter.SyncAdapter starting sync ...
20140313T130816Z I org.dmfs.carddav.syncadapter.SyncAdapter using synctoken: null
20140313T130816Z V org.dmfs.contacts.GroupManager performed group updates in: 4ms
20140313T130816Z V org.dmfs.carddav.authenticator.Authenticator org.dmfs.carddav.account
20140313T130817Z V org.dmfs.carddav.syncadapter.SyncAdapter Syncing http://127.0.0.1/egroupware/groupdav.php/addressbook/ admin
20140313T130817Z V org.dmfs.dav.methods.DavOptions Code : 200
20140313T130817Z D org.dmfs.dav.CardDav supported report: addressbook-multiget
20140313T130817Z D org.dmfs.dav.CardDav supported report: addressbook-query
20140313T130817Z D org.dmfs.dav.CardDav getctag: 1394602977
20140313T130817Z D org.dmfs.dav.CardDav found privilege unbind
20140313T130817Z D org.dmfs.dav.CardDav found privilege read
20140313T130817Z D org.dmfs.dav.CardDav found privilege read-current-user-privilege-set
20140313T130817Z D org.dmfs.dav.CardDav found privilege bind
20140313T130817Z D org.dmfs.dav.CardDav found privilege write-properties
20140313T130817Z D org.dmfs.dav.CardDav found privilege write-content
20140313T130817Z V org.dmfs.dav.CardDav sync-collection not supported - falling back to full sync
20140313T130817Z I org.dmfs.dav.CardDav ignoring non-contact result http://127.0.0.1/egroupware/groupdav.php/addressbook/ with content-type: httpd/unix-directory
20140313T130817Z V org.dmfs.dav.CardDav found item: 1.vcf 0 1:0 text/vcard
20140313T130817Z V org.dmfs.dav.CardDav found item: 2.vcf 0 2:0 text/vcard
20140313T130817Z V org.dmfs.dav.CardDav found item: 3.vcf 0 3:0 text/vcard
20140313T130817Z V org.dmfs.dav.CardDav found item: 4.vcf 0 4:0 text/vcard
20140313T130817Z V org.dmfs.dav.CardDav found item: 5.vcf 0 5:0 text/vcard
20140313T130817Z V org.dmfs.dav.CardDav found item: 6.vcf 0 6:1 text/vcard
20140313T130817Z V org.dmfs.dav.CardDav found item: 7.vcf 0 7:0 text/vcard
20140313T130817Z V org.dmfs.dav.CardDav found item: 571799f8-a9f5-4f52-bc95-1472bdb65f63.vcf 0 8:1 text/vcard
20140313T130817Z V org.dmfs.dav.CardDav received 8 items
20140313T130817Z V org.dmfs.carddav.authenticator.Authenticator org.dmfs.carddav.account
20140313T130817Z V org.dmfs.carddav.authenticator.Authenticator org.dmfs.carddav.account
20140313T130817Z V org.dmfs.contacts.ContactsManager time to update uids: 29 ms
20140313T130817Z V org.dmfs.sync.Synchronator pairing entities
20140313T130817Z V org.dmfs.sync.Synchronator sorting 8 pairs
20140313T130817Z I org.dmfs.sync.Synchronator r/u/n: 0/0/8
20140313T130817Z V org.dmfs.vcardadapter.VCardSource preloading 8 entities
20140313T130817Z V org.dmfs.dav.CardDav multiget called
20140313T130817Z V org.dmfs.sync.Synchronator conflicts: 0
20140313T130817Z V org.dmfs.contacts.ContactEditor create in db 1.vcf
20140313T130817Z V org.dmfs.contacts.ContactEditor create in db 3.vcf
20140313T130817Z V org.dmfs.contacts.ContactEditor create in db 2.vcf
20140313T130817Z V org.dmfs.contacts.ContactEditor create in db 7.vcf
20140313T130817Z V org.dmfs.contacts.ContactEditor create in db 4.vcf
20140313T130817Z V org.dmfs.contacts.ContactEditor create in db 5.vcf
20140313T130817Z V org.dmfs.contacts.ContactEditor create in db 6.vcf
20140313T130817Z V org.dmfs.contacts.ContactEditor create in db 571799f8-a9f5-4f52-bc95-1472bdb65f63.vcf
20140313T130817Z I org.dmfs.carddav.syncadapter.BatchOperations executing 23 database operations
20140313T130818Z V org.dmfs.carddav.syncadapter.BatchOperations execution finished
20140313T130818Z V org.dmfs.contacts.GroupManager trigger memberships
20140313T130818Z V PendingMembershipProvider writing memberships
20140313T130818Z V PendingMembershipProvider writing memberships execute
20140313T130818Z V PendingMembershipProvider writing memberships done in 21 ms
20140313T130818Z I org.dmfs.carddav.syncadapter.SyncAdapter storing synctoken: 1394602977
20140313T130818Z V org.dmfs.syncadapter.SyncAdapter sync complete
App: org.dmfs.carddav.sync
App version: 0.4.5
OS version: 15
OS Info: samsung/GT-I9100P/GT-I9100P:4.0.3/IML74K/BVLP8:user/release-keys
Date: Thu Mar 13 14:13:57 HNEC 2014

我在这个日志中找不到问题。所以我想知道联系人应用程序是否写了可以为我提供更多信息的日志。

请注意,在使用Android v.2的其他手机上我没有遇到此问题。在有问题的手机上,我尝试了免费和付费版本的CardDAV Sync。

2 个答案:

答案 0 :(得分:1)

您的设备运行的是Android 4.0.3(SDK级别15),因此您可以使用没有root权限的CatLog等应用:https://play.google.com/store/apps/details?id=com.nolanlawson.logcat

答案 1 :(得分:0)

从API 16开始,您无法读取其他应用程序的日志文件。您只能访问从您自己的应用程序发出的日志记录。

    ArrayList<String> commandLine = new ArrayList<String>();
    commandLine.add("logcat");//$NON-NLS-1$
    commandLine.add("-d");//$NON-NLS-1$
    ArrayList<String> arguments = ((params != null) && (params.length > 0)) ? params[0] : null;

    if (null != arguments){
         commandLine.addAll(arguments);
    }

    Process process = Runtime.getRuntime().exec(commandLine.toArray(new String[0]));
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));

    String line;
    while ((line = bufferedReader.readLine()) != null){ 
         log.append(line);
         log.append(App.LINE_SEPARATOR); 
    }