blackberry / BB10-Webworks-Packager

The BB10 WebWorks Packager bundles the App content with the BB10 WebWorks Framework to create a BAR to run on the BB10 Device (or simulator)
27 stars 18 forks source link

Add a log level param to the packager #221

Open gtanner opened 11 years ago

gtanner commented 11 years ago

We have a single config.xml file for cordova since it is possible to build the same projects for OS7, PlayBook and BlackBerry 10.

Currently everytime we build it warns for each feature ID that is for the older versions of WebWorks.

build:
 [exec] [INFO]    Populating application source
 [exec] [INFO]    Parsing config.xml
 [exec] [WARN]    Build ID set in config.xml [version], but no signing password was provided [-g]. Bar will be unsigned
 [exec] [WARN]    Failed to find feature with id: org.apache.cordova
 [exec] [WARN]    Failed to find feature with id: blackberry.find
 [exec] [WARN]    Failed to find feature with id: blackberry.identity.phone
 [exec] [WARN]    Failed to find feature with id: blackberry.pim.Address
 [exec] [WARN]    Failed to find feature with id: blackberry.pim.Contact
 [exec] [WARN]    Failed to find feature with id: blackberry.io.file
 [exec] [WARN]    Failed to find feature with id: blackberry.utils
 [exec] [WARN]    Failed to find feature with id: blackberry.io.dir
 [exec] [WARN]    Failed to find feature with id: blackberry.app.event
 [exec] [WARN]    Failed to find feature with id: blackberry.system.event
 [exec] [WARN]    Failed to find feature with id: blackberry.widgetcache
 [exec] [WARN]    Failed to find feature with id: blackberry.media.camera
 [exec] [WARN]    Failed to find feature with id: blackberry.media.microphone
 [exec] [INFO]    Generating output files
 [exec] [INFO]    Info: Package created: /Users/gtanner/Projects/incubator-cordova-blackberry-webworks/example/build/simulator/cordovaExample.bar
 [exec] [INFO]    Info: Package created: /Users/gtanner/Projects/incubator-cordova-blackberry-webworks/example/build/device/cordovaExample.bar
 [exec] [INFO]    BAR packaging complete

BUILD SUCCESSFUL
Total time: 12 seconds

We should be able to add a logging level command to filter out warnings

gtanner commented 11 years ago

I would also be ok with a way to surpress all of the warnings. because the BuildID warning is also causing issues.

nukulb commented 11 years ago

so you want a --silent flag on the packager?

gtanner commented 11 years ago

sort of, except I want INFO and ERROR log levels.

Just want to suppress warnings since they are just misleading in the context of PhoneGap

gtanner commented 11 years ago

@nukulb

would you be ok with:

--warn, -w
--error, -e
--verbose, -v

Verbose already exists, I would just add the warn and error commands.

Error: would only output error and info log messages Warn: Would output error, warning, and info log messages Verbose; would function exactly how it does now.

cdelcol commented 11 years ago

i'd prefer to leave current alone, and add --quiet instead. When things go wrong, you'll see the output in forums and it usually gives enough of a clue to figure out the failure and reproduce easily. Also, some of it has been put in place because we want the dev to see some of the messaging...ie deprecated api's, etc

gtanner commented 11 years ago

Correct, it would default to warn which is the normal behavour now. You guys already have a --verbose option, that is what I was referring to 'exactly how it does now'

cdelcol commented 11 years ago

ah. Clear now.