Skip to content

Commit

Permalink
add license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
georgii-borovinskikh-sonarsource committed Dec 23, 2024
1 parent 6accf18 commit 6838d47
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 7 deletions.
24 changes: 22 additions & 2 deletions src/Core/Logging/ILogVerbosityIndicator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
namespace SonarLint.VisualStudio.Core.Logging;
/*
* SonarLint for Visual Studio
* Copyright (C) 2016-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

namespace SonarLint.VisualStudio.Core.Logging;

public interface ILogVerbosityIndicator
{
bool IsVerboseEnabled { get; }
bool IsThreadIdEnabled { get; }
}
}
24 changes: 22 additions & 2 deletions src/Core/Logging/ILogWriter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
namespace SonarLint.VisualStudio.Core.Logging;
/*
* SonarLint for Visual Studio
* Copyright (C) 2016-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

namespace SonarLint.VisualStudio.Core.Logging;

public interface ILogWriter
{
void WriteLine(string message);
}
}
23 changes: 22 additions & 1 deletion src/Core/Logging/LogContextManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
using System.Collections.Immutable;
/*
* SonarLint for Visual Studio
* Copyright (C) 2016-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/


using System.Collections.Immutable;
using System.ComponentModel.Composition;

namespace SonarLint.VisualStudio.Core.Logging;
Expand Down
24 changes: 22 additions & 2 deletions src/Core/Logging/LoggerFactory.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
using System.ComponentModel.Composition;
/*
* SonarLint for Visual Studio
* Copyright (C) 2016-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

using System.ComponentModel.Composition;

namespace SonarLint.VisualStudio.Core.Logging;

Expand All @@ -10,4 +30,4 @@ public class LoggerFactory(ILogContextManager logContextManager) : ILoggerFactor
public static ILoggerFactory Default { get; } = new LoggerFactory(new LogContextManager());
public ILogger Create(ILogWriter logWriter, ILogVerbosityIndicator verbosityIndicator) =>
new LoggerBase(logContextManager, logWriter, verbosityIndicator);
}
}

0 comments on commit 6838d47

Please sign in to comment.