Logger_Core 1.0.0

dotnet add package Logger_Core --version 1.0.0
NuGet\Install-Package Logger_Core -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Logger_Core" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Logger_Core --version 1.0.0
#r "nuget: Logger_Core, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Logger_Core as a Cake Addin
#addin nuget:?package=Logger_Core&version=1.0.0

// Install Logger_Core as a Cake Tool
#tool nuget:?package=Logger_Core&version=1.0.0

A logger dll to simply log Page and Activity into a database provided by you.
The Database must contais 2 Tables "GLog", "VisitLog"
The Table GLog :
USE [Your_DatabaseName_Log]
GO

/****** Object:  Table [dbo].[GLog]    Script Date: 6/24/2021 10:46:54 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[GLog](
[LogId] [int] IDENTITY(1,1) NOT NULL,
[UID] [int] NOT NULL,
[LogDate] [datetime] NOT NULL,
[LogType] [int] NULL,
[Message] [varchar](500) NULL,
[Module] [varchar](100) NULL,
[Class] [varchar](100) NULL,
[Method] [varchar](100) NULL,
[Data] [nvarchar](max) NULL,
[ClientInfo] [varchar](400) NULL,
[PageName] [varchar](200) NULL,
[IP] [varchar](200) NULL,
CONSTRAINT [PK_GLog] PRIMARY KEY CLUSTERED
(
[LogId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[GLog] ADD  CONSTRAINT [DF_GLog_LogDate]  DEFAULT (getdate()) FOR [LogDate]
GO

The Table VisitLog :
USE [Your_DatabaseName_Log]
GO

/****** Object:  Table [dbo].[VisitLog]    Script Date: 6/24/2021 10:47:28 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[VisitLog](
[LogId] [int] IDENTITY(1,1) NOT NULL,
[VisitDate] [datetime] NOT NULL,
[UID] [int] NOT NULL,
[PageName] [varchar](200) NOT NULL,
[Machine] [varchar](200) NULL,
[IP] [varchar](100) NULL,
[Platform] [varchar](100) NULL,
CONSTRAINT [PK_VisitLog] PRIMARY KEY CLUSTERED
(
[LogId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[VisitLog] ADD  CONSTRAINT [DF_VisitLog_VisitDate]  DEFAULT (getdate()) FOR [VisitDate]
GO

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 935 6/24/2021

Follow the description and Implement following Stored Procedures :

USE [Your_Database_Name_Log]
GO

/****** Object:  StoredProcedure [dbo].[SaveLog]    Script Date: 6/24/2021 10:49:03 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author: <Ziyad Sanaullah>
-- Create date: <06072019>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[SaveLog]
@Uid int,
@Type int,
@Msg varchar(500),
@Module varchar(100),
@Class varchar(100),
@Method varchar(100),
@Data varchar(MAX),
@Machine varchar(200),
@PageName varchar(200),
@IP varchar(200)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

   INSERT INTO GLog VALUES (@Uid, GETDATE(), @Type, @Msg, @Module, @Class, @Method, @Data, @Machine, @PageName, @IP)
END


USE [Your_Database_Name_Log]
GO

/****** Object:  StoredProcedure [dbo].[SavePageVisit]    Script Date: 6/24/2021 10:49:42 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author: <Ziyad Sanaullah>
-- Create date: <06072019>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[SavePageVisit]
@Uid int,
@PageName varchar(200),
@Machine varchar(200),
@IP varchar(100),
@Platform varchar(100)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

   -- Insert statements for procedure here
INSERT INTO VisitLog VALUES (GETDATE(), @Uid,  @PageName, @Machine, @IP, @Platform)
END



GO




GO