Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhauls the logging system #29

Merged
merged 4 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */

import 'source-map-support/register';

import * as path from 'path';

import {
Expand Down
6 changes: 5 additions & 1 deletion esbuild.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import * as esbuild from 'esbuild';

const production = process.argv.includes('--production');
const watch = process.argv.includes('--watch');

let production = process.argv.includes('--production');
if (process.env.LFORTRAN_LSP_MODE === "debug") {
production = false;
}

async function main() {
const ctx = await esbuild.context({
entryPoints: [
Expand Down
3 changes: 2 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export default [
...tseslint.configs.recommended,
{
rules: {
"@typescript-eslint/no-namespace": "off"
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
];
1 change: 0 additions & 1 deletion integ/spec/function_call1.f90.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ async function getErrorAlert(): Promise<string> {
"return arguments[0].firstChild.nodeValue",
errorAlert);
return errorMessage;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (error: any) {
const retryMessage: string =
"stale element reference: stale element not found in the current frame";
Expand Down
42 changes: 41 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 44 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,46 @@
"type": "string",
"default": "lfortran",
"description": "The path to the LFortran compiler executable."
},
"LFortranLanguageServer.log.level": {
"scope": "resource",
"type": "string",
"enum": [
"off",
"fatal",
"error",
"warn",
"info",
"debug",
"trace",
"all"
],
"default": "info",
"description": "Lowest level of logs to include in the extension's console output."
},
"LFortranLanguageServer.log.benchmark": {
"scope": "resource",
"type": "boolean",
"default": false,
"description": "Whether to benchmark event handlers and related operations."
},
"LFortranLanguageServer.log.filter": {
"scope": "resource",
"type": "string",
"default": "",
"description": "Regular expression for filtering log messages."
},
"LFortranLanguageServer.log.prettyPrint": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Whether to pretty-print JSON objects and arrays."
},
"LFortranLanguageServer.log.indentSize": {
"scope": "resource",
"type": "number",
"default": 2,
"description": "Number of spaces to indent the pretty-printed JSON."
}
}
}
Expand Down Expand Up @@ -105,6 +145,9 @@
"vscode-extension-tester": "^8.9.0"
},
"dependencies": {
"@types/which": "^3.0.4"
"@types/shell-escape": "^0.2.3",
"@types/which": "^3.0.4",
"shell-escape": "^0.2.0",
"source-map-support": "^0.5.21"
}
}
Loading
Loading