forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNLogFactory.cs
More file actions
36 lines (33 loc) · 947 Bytes
/
NLogFactory.cs
File metadata and controls
36 lines (33 loc) · 947 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
30
31
32
33
34
35
36
using System;
using ServiceStack.Logging;
namespace ServiceStack.Logging.NLogger
{
/// <summary>
/// ILogFactory that creates an NLog ILog logger
/// </summary>
public class NLogFactory : ServiceStack.Logging.ILogFactory
{
/// <summary>
/// Initializes a new instance of the <see cref="NLogFactory"/> class.
/// </summary>
public NLogFactory() { }
/// <summary>
/// Gets the logger.
/// </summary>
/// <param name="type">The type.</param>
/// <returns></returns>
public ILog GetLogger(Type type)
{
return new NLogLogger(type);
}
/// <summary>
/// Gets the logger.
/// </summary>
/// <param name="typeName">Name of the type.</param>
/// <returns></returns>
public ILog GetLogger(string typeName)
{
return new NLogLogger(typeName);
}
}
}