Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
eeb13302
Commit
eeb13302
authored
9 years ago
by
Jan Tattermusch
Browse files
Options
Downloads
Patches
Plain Diff
make timestamp format in C# logs more similar to C core
parent
ceb65104
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/csharp/Grpc.Core/Logging/ConsoleLogger.cs
+6
-2
6 additions, 2 deletions
src/csharp/Grpc.Core/Logging/ConsoleLogger.cs
with
6 additions
and
2 deletions
src/csharp/Grpc.Core/Logging/ConsoleLogger.cs
+
6
−
2
View file @
eeb13302
#region Copyright notice and license
// Copyright 2015, Google Inc.
// Copyright 2015
-2016
, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
...
...
@@ -33,12 +33,16 @@
using
System
;
using
System.Collections.Generic
;
using
System.Globalization
;
namespace
Grpc.Core.Logging
{
/// <summary>Logger that logs to System.Console.</summary>
public
class
ConsoleLogger
:
ILogger
{
// Format similar enough to C core log format except nanosecond precision is not supported.
const
string
DateTimeFormatString
=
"MMdd HH:mm:ss.ffffff"
;
readonly
Type
forType
;
readonly
string
forTypeString
;
...
...
@@ -142,7 +146,7 @@ namespace Grpc.Core.Logging
{
Console
.
Error
.
WriteLine
(
"{0}{1} {2}{3}"
,
severityString
,
DateTime
.
Now
,
DateTime
.
Now
.
ToString
(
DateTimeFormatString
,
CultureInfo
.
InvariantCulture
)
,
forTypeString
,
message
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment