application log viewing in output tab #9917
Replies: 8 comments
-
A custom extension can inject |
Beta Was this translation helpful? Give feedback.
-
@akosyakov Thanks for your quick reply. Do you have any sample example for the same. |
Beta Was this translation helpful? Give feedback.
-
This issue has been raised in #4297 and #5039 is an attempt to address this . This PR results in log content being sent to the output view. It is configured to do so only for electron because the logs would be available to the server admin anyway in the browser version. The PR has been rather forgotten, partly because we are no longer dependent on it in our Theia-based product. However I am happy to resurrect it if it would be useful to you. |
Beta Was this translation helpful? Give feedback.
-
Not really, but it would be better to use a connection-scoped injection instead of the current approach. (And I forgot to click on the button to show my comments.) |
Beta Was this translation helpful? Give feedback.
-
@westbury I have tried the approach mentioned in #5039
Note:- I took |
Beta Was this translation helpful? Give feedback.
-
@NitinKhandelwal1947 I've rebased the PR to latest master, so it should work for you now. The errors you saw were due to missing typedefs on the return values, which are now required in Theia. |
Beta Was this translation helpful? Give feedback.
-
@westbury Thanks it worked. But as per my requirements i want to view my application log file content (which write in some location in my machine) in Output tab. Can you please help me . Which part of the code i need to change to accommodate this changes. |
Beta Was this translation helpful? Give feedback.
-
It really depends on the details. If you can get the file contents at the frontend then you simply need to follow instructions in #6617 (comment) . For example, if the script in initiated by the frontend code and it knows when the script has completed then you could, for example, inject the filesystem Now if it is not easy to get the file content to the frontend, or if you are able to read each line from the file as it is written, then it will be a lot easier to use the changes in the PR. It adds support for channel writing from the backend. Have a look at output-channel-logger-server. Do not import anything from that file but do use it as an example. See how the code in that file injects OutputChannelServiceImpl, gets a channel from it, and writes text to the channel. |
Beta Was this translation helpful? Give feedback.
-
Description
I am running a script in theia which write its execution log in a log file. Is there anyway to view the content of the log file in Output tab. Is there anyway to customised Output tab to view user defined log file.
Reproduction Steps
I took
eclipse-theia/theia
code base and running a script in theia which write its execution log in a log file.OS and Theia version:
yarn version:- 1.7.0
node version:- 10.15.3
npm version:- 4.6.1
Windows 10
Diagnostics:
Beta Was this translation helpful? Give feedback.
All reactions