Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
a1081ed1
Unverified
Commit
a1081ed1
authored
Jul 21, 2020
by
Pavitra Golchha
Committed by
GitHub
Jul 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make OdeLog to print to brower console also (#2252)
parent
65a1b03c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
appinventor/appengine/src/com/google/appinventor/client/output/OdeLog.java
...gine/src/com/google/appinventor/client/output/OdeLog.java
+19
-0
No files found.
appinventor/appengine/src/com/google/appinventor/client/output/OdeLog.java
View file @
a1081ed1
...
...
@@ -94,6 +94,7 @@ public final class OdeLog extends Composite {
*/
public
static
void
log
(
String
message
)
{
if
(
isLogAvailable
()
&&
!
Ode
.
isWindowClosing
())
{
consoleInfo
(
message
);
getOdeLog
().
println
(
StringUtils
.
escape
(
message
));
}
}
...
...
@@ -105,6 +106,7 @@ public final class OdeLog extends Composite {
*/
public
static
void
wlog
(
String
message
)
{
if
(
isLogAvailable
()
&&
!
Ode
.
isWindowClosing
())
{
consoleWarn
(
message
);
getOdeLog
().
wprintln
(
StringUtils
.
escape
(
message
));
}
}
...
...
@@ -116,6 +118,7 @@ public final class OdeLog extends Composite {
*/
public
static
void
elog
(
String
message
)
{
if
(
isLogAvailable
()
&&
!
Ode
.
isWindowClosing
())
{
consoleError
(
message
);
getOdeLog
().
eprintln
(
StringUtils
.
escape
(
message
));
}
}
...
...
@@ -210,4 +213,20 @@ public final class OdeLog extends Composite {
text
.
setText
(
""
);
}
}
static
native
void
consoleLog
(
String
message
)
/*-{
console.log(message);
}-*/
;
static
native
void
consoleInfo
(
String
message
)
/*-{
console.info(message);
}-*/
;
static
native
void
consoleWarn
(
String
message
)
/*-{
console.warn(message);
}-*/
;
static
native
void
consoleError
(
String
message
)
/*-{
console.error(message);
}-*/
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment