Skip to content

Commit e9d1a10

Browse files
committed
move logging impl classes down to SS.Logging
1 parent 5c296f6 commit e9d1a10

29 files changed

Lines changed: 19 additions & 102 deletions

src/ServiceStack.Interfaces/Logging/Support/Logging/ConsoleLogFactory.cs renamed to src/ServiceStack.Interfaces/Logging/ConsoleLogFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#if !NETFX_CORE
22
using System;
33

4-
namespace ServiceStack.Logging.Support.Logging
4+
namespace ServiceStack.Logging
55
{
66
/// <summary>
77
/// Creates a Console Logger, that logs all messages to: System.Console

src/ServiceStack.Interfaces/Logging/Support/Logging/ConsoleLogger.cs renamed to src/ServiceStack.Interfaces/Logging/ConsoleLogger.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#if !NETFX_CORE
22
using System;
33

4-
namespace ServiceStack.Logging.Support.Logging
4+
namespace ServiceStack.Logging
55
{
66
/// <summary>
77
/// Default logger is to Console.WriteLine
@@ -19,28 +19,22 @@ public class ConsoleLogger : ILog
1919
/// <summary>
2020
/// Initializes a new instance of the <see cref="DebugLogger"/> class.
2121
/// </summary>
22-
/// <param name="type">The type.</param>
2322
public ConsoleLogger(string type)
2423
{
2524
}
2625

2726
/// <summary>
2827
/// Initializes a new instance of the <see cref="DebugLogger"/> class.
2928
/// </summary>
30-
/// <param name="type">The type.</param>
3129
public ConsoleLogger(Type type)
3230
{
3331
}
3432

35-
#region ILog Members
36-
3733
public bool IsDebugEnabled { get { return true; } }
3834

3935
/// <summary>
4036
/// Logs the specified message.
4137
/// </summary>
42-
/// <param name="message">The message.</param>
43-
/// <param name="exception">The exception.</param>
4438
private static void Log(object message, Exception exception)
4539
{
4640
string msg = message == null ? string.Empty : message.ToString();
@@ -54,8 +48,6 @@ private static void Log(object message, Exception exception)
5448
/// <summary>
5549
/// Logs the format.
5650
/// </summary>
57-
/// <param name="message">The message.</param>
58-
/// <param name="args">The args.</param>
5951
private static void LogFormat(object message, params object[] args)
6052
{
6153
string msg = message == null ? string.Empty : message.ToString();
@@ -65,7 +57,6 @@ private static void LogFormat(object message, params object[] args)
6557
/// <summary>
6658
/// Logs the specified message.
6759
/// </summary>
68-
/// <param name="message">The message.</param>
6960
private static void Log(object message)
7061
{
7162
string msg = message == null ? string.Empty : message.ToString();
@@ -146,8 +137,6 @@ public void WarnFormat(string format, params object[] args)
146137
{
147138
LogFormat(WARN + format, args);
148139
}
149-
150-
#endregion
151140
}
152141
}
153142
#endif

src/ServiceStack.Interfaces/Logging/Support/Logging/DebugLogFactory.cs renamed to src/ServiceStack.Interfaces/Logging/DebugLogFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace ServiceStack.Logging.Support.Logging
3+
namespace ServiceStack.Logging
44
{
55
/// <summary>
66
/// Creates a Debug Logger, that logs all messages to: System.Diagnostics.Debug

src/ServiceStack.Interfaces/Logging/Support/Logging/DebugLogger.cs renamed to src/ServiceStack.Interfaces/Logging/DebugLogger.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace ServiceStack.Logging.Support.Logging
3+
namespace ServiceStack.Logging
44
{
55
/// <summary>
66
/// Default logger is to System.Diagnostics.Debug.WriteLine
@@ -18,26 +18,20 @@ public class DebugLogger : ILog
1818
/// <summary>
1919
/// Initializes a new instance of the <see cref="DebugLogger"/> class.
2020
/// </summary>
21-
/// <param name="type">The type.</param>
2221
public DebugLogger(string type)
2322
{
2423
}
2524

2625
/// <summary>
2726
/// Initializes a new instance of the <see cref="DebugLogger"/> class.
2827
/// </summary>
29-
/// <param name="type">The type.</param>
3028
public DebugLogger(Type type)
3129
{
3230
}
3331

34-
#region ILog Members
35-
3632
/// <summary>
3733
/// Logs the specified message.
3834
/// </summary>
39-
/// <param name="message">The message.</param>
40-
/// <param name="exception">The exception.</param>
4135
private static void Log(object message, Exception exception)
4236
{
4337
string msg = message == null ? string.Empty : message.ToString();
@@ -51,8 +45,6 @@ private static void Log(object message, Exception exception)
5145
/// <summary>
5246
/// Logs the format.
5347
/// </summary>
54-
/// <param name="message">The message.</param>
55-
/// <param name="args">The args.</param>
5648
private static void LogFormat(object message, params object[] args)
5749
{
5850
string msg = message == null ? string.Empty : message.ToString();
@@ -62,7 +54,6 @@ private static void LogFormat(object message, params object[] args)
6254
/// <summary>
6355
/// Logs the specified message.
6456
/// </summary>
65-
/// <param name="message">The message.</param>
6657
private static void Log(object message)
6758
{
6859
string msg = message == null ? string.Empty : message.ToString();
@@ -145,7 +136,5 @@ public void WarnFormat(string format, params object[] args)
145136
{
146137
LogFormat(WARN + format, args);
147138
}
148-
149-
#endregion
150139
}
151140
}

src/ServiceStack.Interfaces/Logging/ILogFactory.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,11 @@ public interface ILogFactory
1010
/// <summary>
1111
/// Gets the logger.
1212
/// </summary>
13-
/// <param name="type">The type.</param>
14-
/// <returns></returns>
1513
ILog GetLogger(Type type);
1614

1715
/// <summary>
1816
/// Gets the logger.
1917
/// </summary>
20-
/// <param name="typeName">Name of the type.</param>
21-
/// <returns></returns>
2218
ILog GetLogger(string typeName);
2319
}
2420
}

src/ServiceStack.Interfaces/Logging/LogManager.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using ServiceStack.Logging.Support.Logging;
32

43
namespace ServiceStack.Logging
54
{
@@ -15,7 +14,6 @@ public class LogManager
1514
/// Gets or sets the log factory.
1615
/// Use this to override the factory that is used to create loggers
1716
/// </summary>
18-
/// <value>The log factory.</value>
1917
public static ILogFactory LogFactory
2018
{
2119
get
@@ -32,8 +30,6 @@ public static ILogFactory LogFactory
3230
/// <summary>
3331
/// Gets the logger.
3432
/// </summary>
35-
/// <param name="type">The type.</param>
36-
/// <returns></returns>
3733
public static ILog GetLogger(Type type)
3834
{
3935
return LogFactory.GetLogger(type);
@@ -42,8 +38,6 @@ public static ILog GetLogger(Type type)
4238
/// <summary>
4339
/// Gets the logger.
4440
/// </summary>
45-
/// <param name="typeName">Name of the type.</param>
46-
/// <returns></returns>
4741
public static ILog GetLogger(string typeName)
4842
{
4943
return LogFactory.GetLogger(typeName);

src/ServiceStack.Interfaces/Logging/Support/Logging/NullDebugLogger.cs renamed to src/ServiceStack.Interfaces/Logging/NullDebugLogger.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace ServiceStack.Logging.Support.Logging
3+
namespace ServiceStack.Logging
44
{
55
/// <summary>
66
/// Default logger is to System.Diagnostics.Debug.Print
@@ -12,43 +12,34 @@ public class NullDebugLogger : ILog
1212
/// <summary>
1313
/// Initializes a new instance of the <see cref="DebugLogger"/> class.
1414
/// </summary>
15-
/// <param name="type">The type.</param>
1615
public NullDebugLogger(string type)
1716
{
1817
}
1918

2019
/// <summary>
2120
/// Initializes a new instance of the <see cref="DebugLogger"/> class.
2221
/// </summary>
23-
/// <param name="type">The type.</param>
2422
public NullDebugLogger(Type type)
2523
{
2624
}
2725

28-
#region ILog Members
29-
3026
/// <summary>
3127
/// Logs the specified message.
3228
/// </summary>
33-
/// <param name="message">The message.</param>
34-
/// <param name="exception">The exception.</param>
3529
private static void Log(object message, Exception exception)
3630
{
3731
}
3832

3933
/// <summary>
4034
/// Logs the format.
4135
/// </summary>
42-
/// <param name="message">The message.</param>
43-
/// <param name="args">The args.</param>
4436
private static void LogFormat(object message, params object[] args)
4537
{
4638
}
4739

4840
/// <summary>
4941
/// Logs the specified message.
5042
/// </summary>
51-
/// <param name="message">The message.</param>
5243
private static void Log(object message)
5344
{
5445
}
@@ -114,7 +105,5 @@ public void Warn(object message)
114105
public void WarnFormat(string format, params object[] args)
115106
{
116107
}
117-
118-
#endregion
119108
}
120109
}

src/ServiceStack.Interfaces/Logging/Support/Logging/NullLogFactory.cs renamed to src/ServiceStack.Interfaces/Logging/NullLogFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace ServiceStack.Logging.Support.Logging
3+
namespace ServiceStack.Logging
44
{
55
/// <summary>
66
/// Creates a Debug Logger, that logs all messages to: System.Diagnostics.Debug

src/ServiceStack.Interfaces/Logging/Support/Logging/StringBuilderLog.cs renamed to src/ServiceStack.Interfaces/Logging/StringBuilderLog.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System;
33
using System.Text;
44

5-
namespace ServiceStack.Logging.Support.Logging
5+
namespace ServiceStack.Logging
66
{
77
/// <summary>
88
/// StringBuilderLog writes to shared StringBuffer.
@@ -64,8 +64,6 @@ public StringBuilderLog(Type type, StringBuilder logs)
6464
/// <summary>
6565
/// Logs the specified message.
6666
/// </summary>
67-
/// <param name="message">The message.</param>
68-
/// <param name="exception">The exception.</param>
6967
private void Log(object message, Exception exception)
7068
{
7169
string msg = message == null ? string.Empty : message.ToString();
@@ -80,8 +78,6 @@ private void Log(object message, Exception exception)
8078
/// <summary>
8179
/// Logs the format.
8280
/// </summary>
83-
/// <param name="message">The message.</param>
84-
/// <param name="args">The args.</param>
8581
private void LogFormat(object message, params object[] args)
8682
{
8783
string msg = message == null ? string.Empty : message.ToString();

src/ServiceStack.Interfaces/Logging/Support/Logging/TestLogFactory.cs renamed to src/ServiceStack.Interfaces/Logging/TestLogFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace ServiceStack.Logging.Support.Logging
3+
namespace ServiceStack.Logging
44
{
55
/// <summary>
66
/// Creates a test Logger, that stores all log messages in a member list

0 commit comments

Comments
 (0)