Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
NChronicle.Core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
22
Issues
22
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NChronicle
NChronicle.Core
Commits
e89104c4
Verified
Commit
e89104c4
authored
May 25, 2019
by
Andrew James
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#10
Stop chronicle record message defaulting to exception message
parent
57ed468d
Pipeline
#102
passed with stages
in 7 minutes and 9 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
AndRecordingAnException.cs
...Core.Tests/WhenUsingAChronicle/AndRecordingAnException.cs
+2
-2
AndRecordingAnExceptionWithTags.cs
...ts/WhenUsingAChronicle/AndRecordingAnExceptionWithTags.cs
+2
-2
AndRecordingAnException.cs
...ngAChronicle/WithPersistedTags/AndRecordingAnException.cs
+2
-2
AndRecordingAnExceptionWithTags.cs
...icle/WithPersistedTags/AndRecordingAnExceptionWithTags.cs
+2
-2
ChronicleLibrary.cs
NChronicle.Core/Abstractions/ChronicleLibrary.cs
+1
-1
Chronicle.cs
NChronicle.Core/Chronicle.cs
+8
-8
No files found.
NChronicle.Core.Tests/WhenUsingAChronicle/AndRecordingAnException.cs
View file @
e89104c4
...
...
@@ -55,7 +55,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
[
TestMethod
]
[
DynamicData
(
nameof
(
_chronicleLevel
))]
public
void
ThenTheMessageIs
TheExceptionMessage
(
ChronicleLevel
level
)
public
void
ThenTheMessageIs
Null
(
ChronicleLevel
level
)
{
Exception
exception
;
try
...
...
@@ -72,7 +72,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
// Assert
Assert
.
IsNotNull
(
this
.
_receivedRecord
,
"No ChronicleRecord was received."
);
Assert
.
AreEqual
(
exception
.
Message
,
this
.
_receivedRecord
.
Message
,
"Message in received ChronicleRecord is not exception message
."
);
Assert
.
IsNull
(
this
.
_receivedRecord
.
Message
,
"Message in received ChronicleRecord is not null
."
);
}
[
TestMethod
]
...
...
NChronicle.Core.Tests/WhenUsingAChronicle/AndRecordingAnExceptionWithTags.cs
View file @
e89104c4
...
...
@@ -54,7 +54,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
[
TestMethod
]
[
DynamicData
(
nameof
(
_chronicleLevel
))]
public
void
ThenTheMessageIs
TheExceptionMessage
(
ChronicleLevel
level
)
public
void
ThenTheMessageIs
Null
(
ChronicleLevel
level
)
{
Exception
exception
;
try
...
...
@@ -71,7 +71,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
// Assert
Assert
.
IsNotNull
(
this
.
_receivedRecord
,
"No ChronicleRecord was received."
);
Assert
.
AreEqual
(
exception
.
Message
,
this
.
_receivedRecord
.
Message
,
"Message in received ChronicleRecord is not exception message
."
);
Assert
.
IsNull
(
this
.
_receivedRecord
.
Message
,
"Message in received ChronicleRecord is not null
."
);
}
[
TestMethod
]
...
...
NChronicle.Core.Tests/WhenUsingAChronicle/WithPersistedTags/AndRecordingAnException.cs
View file @
e89104c4
...
...
@@ -58,7 +58,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
[
TestMethod
]
[
DynamicData
(
nameof
(
_chronicleLevel
))]
public
void
ThenTheMessageIs
TheExceptionMessage
(
ChronicleLevel
level
)
public
void
ThenTheMessageIs
Null
(
ChronicleLevel
level
)
{
Exception
exception
;
try
...
...
@@ -75,7 +75,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
// Assert
Assert
.
IsNotNull
(
this
.
_receivedRecord
,
"No ChronicleRecord was received."
);
Assert
.
AreEqual
(
exception
.
Message
,
this
.
_receivedRecord
.
Message
,
"Message in received ChronicleRecord is not exception message
."
);
Assert
.
IsNull
(
this
.
_receivedRecord
.
Message
,
"Message in received ChronicleRecord is not null
."
);
}
[
TestMethod
]
...
...
NChronicle.Core.Tests/WhenUsingAChronicle/WithPersistedTags/AndRecordingAnExceptionWithTags.cs
View file @
e89104c4
...
...
@@ -57,7 +57,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
[
TestMethod
]
[
DynamicData
(
nameof
(
_chronicleLevel
))]
public
void
ThenTheMessageIs
TheExceptionMessage
(
ChronicleLevel
level
)
public
void
ThenTheMessageIs
Null
(
ChronicleLevel
level
)
{
Exception
exception
;
try
...
...
@@ -74,7 +74,7 @@ namespace KSharp.NChronicle.Core.Tests.ForChronicle
// Assert
Assert
.
IsNotNull
(
this
.
_receivedRecord
,
"No ChronicleRecord was received."
);
Assert
.
AreEqual
(
exception
.
Message
,
this
.
_receivedRecord
.
Message
,
"Message in received ChronicleRecord is not exception message
."
);
Assert
.
IsNull
(
this
.
_receivedRecord
.
Message
,
"Message in received ChronicleRecord is not null
."
);
}
[
TestMethod
]
...
...
NChronicle.Core/Abstractions/ChronicleLibrary.cs
View file @
e89104c4
...
...
@@ -271,7 +271,7 @@ namespace KSharp.NChronicle.Core.Abstractions
private
string
MessageKeyHandler
(
ChronicleRecord
record
)
{
return
record
.
Message
!=
record
.
Exception
?.
Message
?
record
.
Message
:
string
.
Empty
;
return
record
.
Message
;
}
private
string
ExceptionKeyHandler
(
ChronicleRecord
record
)
...
...
NChronicle.Core/Chronicle.cs
View file @
e89104c4
...
...
@@ -76,7 +76,7 @@ namespace KSharp.NChronicle.Core
/// <param name="tags">Tags to be appended to this record.</param>
public
void
Emergency
(
Exception
exception
,
params
string
[]
tags
)
{
this
.
Emergency
(
exception
.
Message
,
exception
,
tags
);
this
.
Emergency
(
null
,
exception
,
tags
);
}
/// <summary>
...
...
@@ -110,7 +110,7 @@ namespace KSharp.NChronicle.Core
/// <param name="tags">Tags to be appended to this record.</param>
public
void
Fatal
(
Exception
exception
,
params
string
[]
tags
)
{
this
.
Fatal
(
exception
.
Message
,
exception
,
tags
);
this
.
Fatal
(
null
,
exception
,
tags
);
}
/// <summary>
...
...
@@ -144,7 +144,7 @@ namespace KSharp.NChronicle.Core
/// <param name="tags">Tags to be appended to this record.</param>
public
void
Critical
(
Exception
exception
,
params
string
[]
tags
)
{
this
.
Critical
(
exception
.
Message
,
exception
,
tags
);
this
.
Critical
(
null
,
exception
,
tags
);
}
/// <summary>
...
...
@@ -178,7 +178,7 @@ namespace KSharp.NChronicle.Core
/// <param name="tags">Tags to be appended to this record.</param>
public
void
Warning
(
Exception
exception
,
params
string
[]
tags
)
{
this
.
Warning
(
exception
.
Message
,
exception
,
tags
);
this
.
Warning
(
null
,
exception
,
tags
);
}
/// <summary>
...
...
@@ -212,7 +212,7 @@ namespace KSharp.NChronicle.Core
/// <param name="tags">Tags to be appended to this record.</param>
public
void
Debug
(
Exception
exception
,
params
string
[]
tags
)
{
this
.
Debug
(
exception
.
Message
,
exception
,
tags
);
this
.
Debug
(
null
,
exception
,
tags
);
}
/// <summary>
...
...
@@ -246,7 +246,7 @@ namespace KSharp.NChronicle.Core
/// <param name="tags">Tags to be appended to this record.</param>
public
void
Success
(
Exception
exception
,
params
string
[]
tags
)
{
this
.
Success
(
exception
.
Message
,
exception
,
tags
);
this
.
Success
(
null
,
exception
,
tags
);
}
/// <summary>
...
...
@@ -280,7 +280,7 @@ namespace KSharp.NChronicle.Core
/// <param name="tags">Tags to be appended to this record.</param>
public
void
Info
(
Exception
exception
,
params
string
[]
tags
)
{
this
.
Info
(
exception
.
Message
,
exception
,
tags
);
this
.
Info
(
null
,
exception
,
tags
);
}
/// <summary>
...
...
@@ -314,7 +314,7 @@ namespace KSharp.NChronicle.Core
/// <param name="tags">Tags to be appended to this record.</param>
public
void
Trace
(
Exception
exception
,
params
string
[]
tags
)
{
this
.
Trace
(
exception
.
Message
,
exception
,
tags
);
this
.
Trace
(
null
,
exception
,
tags
);
}
/// <summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment