Skip to content

Commit

Permalink
Merge pull request #3 from cgay/dev
Browse files Browse the repository at this point in the history
Update for logging library changes
  • Loading branch information
pedro-w authored Mar 26, 2021
2 parents e7c68a2 + aaa2fd3 commit 761c842
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "ext/command-line-parser"]
path = ext/command-line-parser
url = [email protected]:dylan-lang/command-line-parser
[submodule "ext/logging"]
path = ext/logging
url = [email protected]:dylan-lang/logging
1 change: 1 addition & 0 deletions ext/logging
Submodule logging added at 2f8832
7 changes: 4 additions & 3 deletions lsp-dylan.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ define constant $log
$lsp-log-target));

define function local-log(m :: <string>, #rest params) => ()
apply(log-debug, $log, m, params);
apply(log-debug, m, params);
end function;

define constant $message-type-error = 1;
Expand Down Expand Up @@ -341,7 +341,7 @@ define function test-open-project(session) => ()

*module* := m;
if (*project*)
let warn = curry(log-warning, $log, "open-project-compiler-database: %=");
let warn = curry(log-warning, "open-project-compiler-database: %=");
let db = open-project-compiler-database(*project*, warning-callback: warn);
local-log("test-open-project: db = %=", db);
for (s in project-sources(*project*))
Expand Down Expand Up @@ -404,7 +404,7 @@ define function handle-initialize
*trace-verbose* := #t;
end;
otherwise =>
log-error($log, "handle-initialize: trace must be"
log-error("handle-initialize: trace must be"
" \"off\", \"messages\" or \"verbose\", not %=", trace);
end select;
local-log("handle-initialize: debug: %s, messages: %s, verbose: %s",
Expand Down Expand Up @@ -749,6 +749,7 @@ end clp/command-line;

define function main
(name :: <string>, arguments :: <vector>)
*log* := $log;
let command = make(<lsp-server-command-line>,
help: "Dylan LSP server");
block ()
Expand Down
1 change: 1 addition & 0 deletions registry/generic/logging
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abstract://dylan/ext/logging/logging.lid

0 comments on commit 761c842

Please sign in to comment.