Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
efaa4f9b
Commit
efaa4f9b
authored
Aug 16, 2021
by
aniket-engg
Committed by
Aniket
Aug 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support nodejs log formatting
parent
7835d68d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
blockchain.js
apps/remix-ide/src/blockchain/blockchain.js
+8
-1
No files found.
apps/remix-ide/src/blockchain/blockchain.js
View file @
efaa4f9b
...
@@ -3,6 +3,7 @@ import { Plugin } from '@remixproject/engine'
...
@@ -3,6 +3,7 @@ import { Plugin } from '@remixproject/engine'
import
{
toBuffer
,
addHexPrefix
}
from
'ethereumjs-util'
import
{
toBuffer
,
addHexPrefix
}
from
'ethereumjs-util'
import
{
waterfall
}
from
'async'
import
{
waterfall
}
from
'async'
import
{
EventEmitter
}
from
'events'
import
{
EventEmitter
}
from
'events'
import
{
format
}
from
'util'
import
{
ExecutionContext
}
from
'./execution-context'
import
{
ExecutionContext
}
from
'./execution-context'
import
VMProvider
from
'./providers/vm.js'
import
VMProvider
from
'./providers/vm.js'
import
InjectedProvider
from
'./providers/injected.js'
import
InjectedProvider
from
'./providers/injected.js'
...
@@ -502,7 +503,13 @@ class Blockchain extends Plugin {
...
@@ -502,7 +503,13 @@ class Blockchain extends Plugin {
if
(
hhlogs
&&
hhlogs
.
length
)
{
if
(
hhlogs
&&
hhlogs
.
length
)
{
let
finalLogs
=
'console.log:
\
n'
let
finalLogs
=
'console.log:
\
n'
for
(
const
log
of
hhlogs
)
{
for
(
const
log
of
hhlogs
)
{
finalLogs
=
finalLogs
+
log
.
join
(
''
)
+
'
\
n'
let
formattedLog
if
(
typeof
log
[
0
]
===
'string'
&&
(
log
[
0
].
includes
(
'%s'
)
||
log
[
0
].
includes
(
'%d'
)))
{
formattedLog
=
format
(
log
[
0
],
...
log
.
slice
(
1
))
}
else
{
formattedLog
=
log
.
join
(
''
)
}
finalLogs
=
finalLogs
+
formattedLog
+
'
\
n'
}
}
this
.
call
(
'terminal'
,
'log'
,
{
type
:
'info'
,
value
:
finalLogs
})
this
.
call
(
'terminal'
,
'log'
,
{
type
:
'info'
,
value
:
finalLogs
})
}
}
...
...
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