-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
29 lines (27 loc) · 706 Bytes
/
Program.cs
File metadata and controls
29 lines (27 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using NLog.Extensions.Logging;
using Cassandra;
using NLog;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var provider = new NLogLoggerProvider();
// Add it before initializing the Cluster
Cassandra.Diagnostics.AddLoggerProvider(provider);
Cluster cluster = Cluster.Builder().
AddContactPoint("127.0.0.1").
Build();
ISession session = null;
try
{
session = cluster.Connect();
}
catch (Exception)
{
}
}
}
}