Apache Cordova
  1. Apache Cordova
  2. CB-1138

Default logging level for file access should not log file contents.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1.0
    • Component/s: iOS
    • Labels:
    • Environment:

      iOS 5.0 targetting app, running in debug conf with XCode 4.3.2 (or 4.4)

      Description

      I am loading a huge text file (a few mb) using cordova file api and cordova is trying to log each line of the text file to the console in XCode.

      I think default logging, even in debug mode, should have a saner level.

      This was not the case in earlier versions. In default logging mode in 2.0.0 version, I cannot even stop XCode once I run my app!!

      Also: same problem when getting all contacts. See: https://groups.google.com/forum/?fromgroups#!topic/phonegap/WTpeYf3Ji5k

        Issue Links

          Activity

          Show
          Shazron Abdullah added a comment - The offending lines: https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPluginResult.m#L122 https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPluginResult.m#L130 https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVPluginResult.m#L139
          Hide
          Shazron Abdullah added a comment -

          We need a way for the project (not CordovaLib) to turn this ON. It should be OFF by default. Perhaps a Cordova.plist setting.

          Show
          Shazron Abdullah added a comment - We need a way for the project (not CordovaLib) to turn this ON. It should be OFF by default. Perhaps a Cordova.plist setting.
          Hide
          Shazron Abdullah added a comment -

          Workaround for now is to set your scheme to Release. By default it is Debug which will be verbose like what you have seen.

          Show
          Shazron Abdullah added a comment - Workaround for now is to set your scheme to Release. By default it is Debug which will be verbose like what you have seen.
          Hide
          Shazron Abdullah added a comment -

          Unfortunately subprojects cannot inherit macros from their parent projects.

          I think I have a solution - adding a class function called setVerbose:(BOOL)verbose that by default is NO.

          In your project file, in your AppDelegate::init, to turn it on, you would do:
          [CDVPluginResult setVerbose:YES];

          Show
          Shazron Abdullah added a comment - Unfortunately subprojects cannot inherit macros from their parent projects. I think I have a solution - adding a class function called setVerbose:(BOOL)verbose that by default is NO. In your project file, in your AppDelegate::init, to turn it on, you would do: [CDVPluginResult setVerbose:YES] ;
          Hide
          Shazron Abdullah added a comment -

          Fix commit:
          http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/2979d14d

          Then, to turn it ON, add this in your AppDelegate.m's init function:
          [CDVPluginResult setVerbose:YES];

          By default, it is OFF.

          Show
          Shazron Abdullah added a comment - Fix commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/2979d14d Then, to turn it ON, add this in your AppDelegate.m's init function: [CDVPluginResult setVerbose:YES] ; By default, it is OFF.

            People

            • Assignee:
              Shazron Abdullah
              Reporter:
              Koray Balci
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development