File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
crates/core/src/prelude/src Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ members = [
66]
77
88[workspace .package ]
9- version = " 1.5.0 "
9+ version = " 1.5.1 "
1010edition = " 2021"
1111authors = [" The Extism Authors" ]
1212license = " BSD-Clause-3"
Original file line number Diff line number Diff line change @@ -253,12 +253,15 @@ module.exports = { count };
253253
254254### Logging
255255
256- At the current time, calling ` console.log ` emits an ` info ` log. Please file an
257- issue or PR if you want to expose the raw logging interface:
256+ There are several functions that can be used for logging:
258257
259258``` javascript
260259function logStuff () {
261- console .log (" Hello, World!" );
260+ console .info (" Info" );
261+ console .debug (" Debug" );
262+ console .error (" Error" );
263+ console .warn (" Warning" );
264+ console .log (" Log" ); // Alias for console.info
262265}
263266
264267module .exports = { logStuff };
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ function stringifyArg(arg: any): string {
2424
2525 if ( typeof arg === 'object' ) {
2626 if ( arg instanceof Error ) {
27- return arg . stack || `${ arg . name } : ${ arg . message } ` ;
27+ return `${ arg . name } : ${ arg . message } ${ arg . stack ? '\n' : '' } ${ arg . stack } ` ;
2828 }
2929 if ( arg instanceof Set ) {
3030 return `Set(${ arg . size } ) { ${ Array . from ( arg ) . map ( String ) . join ( ', ' ) } }` ;
@@ -71,4 +71,4 @@ const console = {
7171
7272globalThis . console = console ;
7373
74- export { } ;
74+ export { } ;
You can’t perform that action at this time.
0 commit comments