Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: third_party/grpc/src/csharp/Grpc.Core/Logging/NullLogger.cs

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/grpc/src/csharp/Grpc.Core/Logging/NullLogger.cs
diff --git a/third_party/protobuf/csharp/src/Google.Protobuf/Reflection/FieldType.cs b/third_party/grpc/src/csharp/Grpc.Core/Logging/NullLogger.cs
similarity index 50%
copy from third_party/protobuf/csharp/src/Google.Protobuf/Reflection/FieldType.cs
copy to third_party/grpc/src/csharp/Grpc.Core/Logging/NullLogger.cs
index 1658e34cd1e1697d650ee9254149f6121f40bc47..58679a0ff9fc9fd4d2952b1d37f01e6966306433 100644
--- a/third_party/protobuf/csharp/src/Google.Protobuf/Reflection/FieldType.cs
+++ b/third_party/grpc/src/csharp/Grpc.Core/Logging/NullLogger.cs
@@ -1,7 +1,7 @@
-#region Copyright notice and license
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+#region Copyright notice and license
+
+// Copyright 2016, Google Inc.
+// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -28,86 +28,95 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
#endregion
-namespace Google.Protobuf.Reflection
+using System;
+
+namespace Grpc.Core.Logging
{
/// <summary>
- /// Enumeration of all the possible field types.
+ /// Logger which doesn't log any information anywhere.
/// </summary>
- public enum FieldType
+ public sealed class NullLogger : ILogger
{
/// <summary>
- /// The <c>double</c> field type.
- /// </summary>
- Double,
- /// <summary>
- /// The <c>float</c> field type.
- /// </summary>
- Float,
- /// <summary>
- /// The <c>int64</c> field type.
+ /// As with all logging calls on this logger, this method is a no-op.
/// </summary>
- Int64,
- /// <summary>
- /// The <c>uint64</c> field type.
- /// </summary>
- UInt64,
- /// <summary>
- /// The <c>int32</c> field type.
- /// </summary>
- Int32,
- /// <summary>
- /// The <c>fixed64</c> field type.
- /// </summary>
- Fixed64,
- /// <summary>
- /// The <c>fixed32</c> field type.
- /// </summary>
- Fixed32,
- /// <summary>
- /// The <c>bool</c> field type.
- /// </summary>
- Bool,
+ public void Debug(string message)
+ {
+ }
+
/// <summary>
- /// The <c>string</c> field type.
+ /// As with all logging calls on this logger, this method is a no-op.
/// </summary>
- String,
+ public void Debug(string format, params object[] formatArgs)
+ {
+ }
+
/// <summary>
- /// The field type used for groups (not supported in this implementation).
+ /// As with all logging calls on this logger, this method is a no-op.
/// </summary>
- Group,
+ public void Error(string message)
+ {
+ }
+
/// <summary>
- /// The field type used for message fields.
+ /// As with all logging calls on this logger, this method is a no-op.
/// </summary>
- Message,
+ public void Error(Exception exception, string message)
+ {
+ }
+
/// <summary>
- /// The <c>bytes</c> field type.
+ /// As with all logging calls on this logger, this method is a no-op.
/// </summary>
- Bytes,
+ public void Error(string format, params object[] formatArgs)
+ {
+ }
+
/// <summary>
- /// The <c>uint32</c> field type.
+ /// Returns a reference to the instance on which the method is called, as
+ /// instances aren't associated with specific types.
/// </summary>
- UInt32,
+ public ILogger ForType<T>()
+ {
+ return this;
+ }
+
/// <summary>
- /// The <c>sfixed32</c> field type.
+ /// As with all logging calls on this logger, this method is a no-op.
/// </summary>
- SFixed32,
+ public void Info(string message)
+ {
+ }
+
/// <summary>
- /// The <c>sfixed64</c> field type.
+ /// As with all logging calls on this logger, this method is a no-op.
/// </summary>
- SFixed64,
+ public void Info(string format, params object[] formatArgs)
+ {
+ }
+
/// <summary>
- /// The <c>sint32</c> field type.
+ /// As with all logging calls on this logger, this method is a no-op.
/// </summary>
- SInt32,
+ public void Warning(string message)
+ {
+ }
+
/// <summary>
- /// The <c>sint64</c> field type.
+ /// As with all logging calls on this logger, this method is a no-op.
/// </summary>
- SInt64,
+ public void Warning(Exception exception, string message)
+ {
+ }
+
/// <summary>
- /// The field type used for enum fields.
+ /// As with all logging calls on this logger, this method is a no-op.
/// </summary>
- Enum
+ public void Warning(string format, params object[] formatArgs)
+ {
+ }
}
-}
+}
« no previous file with comments | « third_party/grpc/src/csharp/Grpc.Core/Logging/ILogger.cs ('k') | third_party/grpc/src/csharp/Grpc.Core/Marshaller.cs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698