Skip to content

Support a debug level #79

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

Closed
wants to merge 5 commits into from
Closed

Support a debug level #79

wants to merge 5 commits into from

Conversation

2Pit
Copy link
Contributor

@2Pit 2Pit commented Feb 20, 2017

IDEA-188
Добавлена возможность запускать Идею в песочнице с собственными настройками логгирования.
Это нужно чтобы перехватывать сообщения DEBUG уровня интересующих логгеров.

По стандарту Идея фильтрует все Дебаг сообщения из-за это, до сих пор, мы осуществляли всё логгирование на уровне Инфо и выше.

Теперь при запуске плагина в песочнице файл конфигурации перезаписывается файлом
buildSrc/src/resources/log.xml.

Различия со стандартными конфигурациями f500916

log.xml в IDEA, CLion и PyCharm - одинаковый.

image

@2Pit 2Pit added this to the R-0.12 milestone Feb 20, 2017
@2Pit 2Pit self-assigned this Feb 20, 2017
@2Pit 2Pit requested review from taery and meanmail February 20, 2017 21:12
@2Pit 2Pit removed the bug label Feb 20, 2017
@@ -108,6 +112,18 @@ abstract class BaseRunTask extends JavaExec {
jvmArgs = Utils.getProductJvmArgs(this, jvmArgs, idePath)
}

private void configureLogProperties() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Только не в этом классе. Перенеси это в PrepareSandboxTask строка 107 после вызова disableIdeUpdate().
Просто у Gradle хитрая система, он следит за входными и выходными параметрами задачи (в том числе и за состоянием файлов) и если, что-то менять не в той задаче, то он может задачу пропустить, посчитав, что раз входные параметры не изменились, то и нет смысла выполнять задачу вообще. У нас и так с этим проблема, поэтому приходиться постоянно делать clean.

@taery
Copy link
Contributor

taery commented Feb 21, 2017

@2Pit, @meanmail, пишите пожалуйста побольше описания в задачах зачем это нужно (одного заголовка мне недостаточно).

А то я по описанию задачи совсем не могу понять ее суть =)

@@ -108,6 +112,18 @@ abstract class BaseRunTask extends JavaExec {
jvmArgs = Utils.getProductJvmArgs(this, jvmArgs, idePath)
}

private void configureLogProperties() {
def logURL = this.getClass().getResource("/log.xml")
if (logURL == null){
Copy link
Contributor

@taery taery Feb 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И CTRL+ALT+L, пробелов не хватает между ) и { 😄

@2Pit
Copy link
Contributor Author

2Pit commented Feb 22, 2017

Подправил описание тут и в YT )

@meanmail
Copy link
Contributor

Очень плохо, что заменяется файл в кэше gradle. По хорошему все файлы расположенные там должны быть Read Only.
Надо бы разобраться как именно IDEA конфигурирует log4j. Но это она точно не делает через переменные окружения.

@2Pit
Copy link
Contributor Author

2Pit commented Mar 7, 2017

Кажется нашёл.
idea-sandbox/config/options/options.xml

<application>
  <component name="PropertiesComponent">
    <property name="log.debug.categories" value="#com.jetbrains.tmp" />
  </component>
</application>

Эту же настройку можно задавать через UI.
Help | Debug log settings << LoggerName f.e. "#com.jetbrains.tmp"

@2Pit 2Pit closed this Mar 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants