Fifth semester's student project for INTECH IT school.
- Windows
- Powershell
- .NET Core SDK 2.0 (with .NET Core 2.0)
- Visual Studio 2017 (any edition) with .NET framework build tools
- Clone the repository
- In Powershell, run
CodeCakeBuilder/Bootstrap.ps1
- Run
CodeCakeBuilder/bin/Release/CodeCakeBuilder.exe
- Launch
CK.Glouton.Sample.Server
which is a basic implementation ofCK.Glouton.Server
. - Configure your app to implement an Activicty Monitor with the
CK.Glouton.Handler.Tcp
. - Now you can send some log to the sample server !
- Build the Angular app
npm run build
in<ProjectFolder>/src/CK.Glouton.Web/app
. - Create a
appsetting.json
from the already hereappsetting.template.json
(the lucene read location needs to be the same as the lucene write location). - Launch
CK.Glouton.Web
- Go to your site !
System.Console.OutputEncoding = System.Text.Encoding.Unicode;
ActivityMonitor.AutoConfiguration += monitor => monitor.Output.RegisterClient( new ActivityMonitorConsoleClient() );
LogFile.RootLogPath = /* Path to your local logs save */
var grandOutputConfig = new GrandOutputConfiguration();
grandOutputConfig.AddHandler( new TextFileConfiguration
{
MaxCountPerFile = 10000,
Path = "Text",
} );
grandOutputConfig.AddHandler( new TcpHandlerConfiguration
{
Host = "127.0.0.1",
Port = 33698,
IsSecure = false,
AppName = typeof( Program ).GetTypeInfo().Assembly.GetName().Name,
PresentEnvironmentVariables = true,
PresentMonitoringAssemblyInformation = true,
HandleSystemActivityMonitorErrors = true,
} );
GrandOutput.EnsureActiveDefault( grandOutputConfig );
See CK.Glouton.Sample.Client
to see more.
var activityMonitor = new ActivityMonitor();
using( var server = new GloutonServer(
"127.0.0.1",
33698,
activityMonitor,
new SampleClientAuthorizationHandler()
) )
{
server.Open( new HandlersManagerConfiguration
{
GloutonHandlers =
{
new BinaryGloutonHandlerConfiguration
{
Path = "Logs",
MaxCountPerFile = 10000,
UseGzipCompression = true
},
new LuceneGloutonHandlerConfiguration
{
MaxSearch = 1000
},
new AlertHandlerConfiguration
{
DatabasePath = "C:/Glouton/Alerts" // The folder where alerts will be saved, consider this as a mocked database.
}
}
} );
}
See CK.Glouton.Sample.Server
to see more.
"Lucene": {
"MaxSearch": "1000",
"Path": "C:/Glouton/Logs",
"Directory": ""
},
"TcpControlChannel": {
"Host": "localhost",
"Port": 33698,
"IsSecure": false
},
"Database": {
"Path": "C:/Glouton/Alerts"
},
"Monitoring": {
"LogPath": "Logs",
"LogLevel": "Debug",
"GrandOutput": {
"Handlers": {
"Console": true
}
}
Configuration | Description |
---|---|
Lucene.MaxSearch | The maximun number of logs returned by a single research with Lucene |
Lucene.Path | The folder where lucene files will be saved. |
Lucene.Directory | Custom subfolder for above. |
TcpControlChannel.Host | IpAddress of your CK.Glouton.Server. |
TcpControlChannel.Port | Port of your CK.Glouton.Server. |
TcpControlChannel.IsSecure | False by default we didn't implemented a secure connection yet ! |
Database.Path | The folder where alerts will be saved, consider this as a mocked database. |
Monitoring.LogPath | Where log are written in local |
Monitoring.Loglevel | Minimum LogLevel |
Monitoring.GrandOutput.Handler.Console | Active Log in the console |
Feed | Handler | Server |
---|---|---|
MyGet CI | ||
MyGet preview |
Branch | Visual Studio 2017 |
---|---|
latest |
|
develop |
Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.
Assets in this repository are licensed with the MIT License. For more information, please see LICENSE.md.
This repository and its components use the following open-source projects:
- ZooPin/CK-ControlChannel, licensed under the MIT License
- ZooPin/CK-ControlChannel-Abstractions, licensed under the MIT License
- invenietis/CK-Core, licensed under the GNU Lesser General Public License v3.0
- invenietis/CK-Text, licensed under the MIT License
- invenietis/CK-ActivityMonitor, licensed under the GNU Lesser General Public License v3.0
- invenietis/CK-Monitoring, licensed under the MIT License