From 3940bee9165c03aeb64887535270725ae8050512 Mon Sep 17 00:00:00 2001 From: Georgii Borovinskikh Date: Fri, 20 Dec 2024 15:52:42 +0100 Subject: [PATCH] add license headers --- src/Core/Logging/ILogVerbosityIndicator.cs | 24 ++++++++++++++++++++-- src/Core/Logging/ILogWriter.cs | 24 ++++++++++++++++++++-- src/Core/Logging/LogContextManager.cs | 23 ++++++++++++++++++++- src/Core/Logging/LoggerFactory.cs | 24 ++++++++++++++++++++-- 4 files changed, 88 insertions(+), 7 deletions(-) diff --git a/src/Core/Logging/ILogVerbosityIndicator.cs b/src/Core/Logging/ILogVerbosityIndicator.cs index 530e3d200..76bb31552 100644 --- a/src/Core/Logging/ILogVerbosityIndicator.cs +++ b/src/Core/Logging/ILogVerbosityIndicator.cs @@ -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; } -} \ No newline at end of file +} diff --git a/src/Core/Logging/ILogWriter.cs b/src/Core/Logging/ILogWriter.cs index 520640ead..8afafad81 100644 --- a/src/Core/Logging/ILogWriter.cs +++ b/src/Core/Logging/ILogWriter.cs @@ -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); -} \ No newline at end of file +} diff --git a/src/Core/Logging/LogContextManager.cs b/src/Core/Logging/LogContextManager.cs index fdc9fb860..62f3580b8 100644 --- a/src/Core/Logging/LogContextManager.cs +++ b/src/Core/Logging/LogContextManager.cs @@ -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; diff --git a/src/Core/Logging/LoggerFactory.cs b/src/Core/Logging/LoggerFactory.cs index 90ff9c135..7b0e464eb 100644 --- a/src/Core/Logging/LoggerFactory.cs +++ b/src/Core/Logging/LoggerFactory.cs @@ -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; @@ -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); -} \ No newline at end of file +}