Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

[IntelliJ] Improve Logging support of IDE-specific messages #2754

Closed
keithchong opened this issue Apr 23, 2020 · 4 comments
Closed

[IntelliJ] Improve Logging support of IDE-specific messages #2754

keithchong opened this issue Apr 23, 2020 · 4 comments
Assignees
Labels
area/docs Improvements or additions to documentation area/intellij-ide Issue associated with the codewind intellij plugin kind/enhancement

Comments

@keithchong
Copy link

keithchong commented Apr 23, 2020

Codewind version: latest
OS: any

IDE extension version: latest
IDE version: 2019.3

Description of the enhancement:
Improve log support of our Codewind Intellij plugin
Currently we log our INFO level messages to the IntelliJ log file (eg. idea.log) and we are inundating it with our messages, including entire JSON responses from turbine/portal. We need to add debug and trace level flags that need to be turned on in order for the messages to be logged to the log file.

@keithchong keithchong self-assigned this Apr 23, 2020
@keithchong keithchong added the area/intellij-ide Issue associated with the codewind intellij plugin label Apr 23, 2020
@sishida sishida added the area/docs Improvements or additions to documentation label Apr 23, 2020
@sishida sishida self-assigned this Apr 23, 2020
@sishida
Copy link
Contributor

sishida commented Apr 23, 2020

Assigning myself to help with docs work! 🖊️

@keithchong keithchong changed the title [IntelliJ] Improve Logging support [IntelliJ] Improve Logging support for UI specific messages Apr 23, 2020
@keithchong keithchong changed the title [IntelliJ] Improve Logging support for UI specific messages [IntelliJ] Improve Logging support for IDE-specific messages Apr 23, 2020
@keithchong keithchong changed the title [IntelliJ] Improve Logging support for IDE-specific messages [IntelliJ] Improve Logging support of IDE-specific messages Apr 23, 2020
@keithchong
Copy link
Author

keithchong commented Apr 24, 2020

The existing methods will continue to use the class-specific logger category

Logger.log(...) - should be used sparingly since by default INFO messages get written to the log
Logger.logWarning(...) - writes message to log and to console output

The following methods will be added and they will use the generic org.eclipse.codewind category. This category will serve as the 'flag' that the user has to turn on from the Debug Log Settings dialog (or IDE-wide via VM settings) in order for the messages to be written to the log. eg. #org.eclipse.codewind to turn on debug level messages and #org.eclipse.codewind:trace to turn on trace level messages.

Logger.logDebug(...)
Logger.logTrace(...)

Sample debug message: (Note DEBUG level). This particular message change affecting CodewindApplicationFactory will be included in this PR.

2020-04-24 10:53:01,769 [  10366]  DEBUG -          #org.eclipse.codewind - org.eclipse.codewind.intellij.core.CodewindApplicationFactory - [
  {
    "projectID": "13a796c0-831a-11ea-8d0a-fbbaa43527c8",
    "name": "cwGo01",
    "codewindVersion": "0.11.0",
    "language": "go",
    "creationTime": 1587739659654,
    ....
    ....
      ]
    }
  }
] 

The current INFO messages look like this
2020-04-24 11:15:27,562 [ 74276] INFO - ellij.core.CodewindApplication - Set HTTP port for null to 32781

These should be changed to debug or trace level messages and should not be shown in production. These should be changed in a separate PR.

@tetchel
Copy link

tetchel commented Apr 28, 2020

this section can use a quick update to mention intellij
https://www.eclipse.org/codewind/troubleshooting.html#setting-codewind-server-log-levels

@keithchong
Copy link
Author

Closing. Follow-up issue is: #2819

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Improvements or additions to documentation area/intellij-ide Issue associated with the codewind intellij plugin kind/enhancement
Projects
None yet
Development

No branches or pull requests

3 participants