[mod] ver:0.0.28

This commit is contained in:
Andy Bunce 2022-02-20 18:57:48 +00:00
parent 560628c7de
commit 9dd58b2b70
21 changed files with 1129 additions and 1253 deletions

View file

@ -3,3 +3,4 @@ export * from "./create-document-selector";
export * from "./extension-state";
export * from "./native-commands";
export * from "./xml-traverser";
export * from "./logger";

23
src/common/logger.ts Normal file
View file

@ -0,0 +1,23 @@
// debug messages
import { OutputChannel, window } from "vscode";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const XQLint = require("@quodatum/xqlint").XQLint;
const _channel:OutputChannel = window.createOutputChannel("BaseX log");
function logdate(){
return (new Date()).toISOString().slice(0, 19).replace(/-/g, "/").replace("T", " ");
}
export class channel {
static log(msg: string) :void{
_channel.appendLine("["+logdate()+"] "+msg)
}
static appendLine(msg: string) :void{
_channel.appendLine(msg)
}
static show() :void{
_channel.show
}
}
channel.log("started, XQLint version: "+XQLint.version);
_channel.show