const char* kDefaultCSPRule =
"default-src *; script-src 'self'; style-src 'self'; object-src 'none';";
+const char* kResWgtPath = "res/wgt/";
bool FindPrivilege(common::ApplicationData* app_data,
const std::string& privilege) {
static bool enabled = (getenv(kConsoleLogEnableKey) != NULL);
enabled = true;
+ std::string split_msg = msg;
+ std::size_t pos = msg.find(kResWgtPath);
+ if (pos != std::string::npos) {
+ split_msg = msg.substr(pos + strlen(kResWgtPath));
+ }
+
if (debug_mode_ || verbose_mode_ || enabled) {
int dlog_level = DLOG_DEBUG;
switch (level) {
dlog_level = DLOG_DEBUG;
break;
}
- LOGGER_RAW(dlog_level, kConsoleMessageLogTag) << msg;
+ LOGGER_RAW(dlog_level, kConsoleMessageLogTag)
+ << "[" << app_data_->pkg_id() << "] " << split_msg;
}
}
std::stringstream buf;
if (line_number) {
- buf << common::utils::BaseName(ewk_console_message_source_get(msg))
+ buf << ewk_console_message_source_get(msg)
<< ":" << line_number << ": ";
}
buf << ewk_console_message_text_get(msg);