You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-33Lines changed: 16 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,21 @@ log.Info(
57
57
58
58
This log entry will have "County" and "Country" properties added to it.
59
59
60
+
### Automatically Convert `ILoggingAdapter` into `SerilogLoggingAdapter`
61
+
62
+
As of Akka.Logger.Serilog v1.5.22, you can now do the following:
63
+
64
+
```csharp
65
+
varlog=Context.GetLogger()
66
+
.ForContext("Address", "No. 4 Privet Drive")
67
+
.ForContext("Town", "Little Whinging")
68
+
.ForContext("County", "Surrey")
69
+
.ForContext("Country", "England");
70
+
log.Info("My boss makes me use {Semantic} logging", "semantic");
71
+
```
72
+
73
+
And it will work without having to explicitly call `Context.GetLogger<SerilogLoggingAdapter>()` first.
74
+
60
75
## Building this solution
61
76
To run the build script associated with this solution, execute the following:
62
77
@@ -72,36 +87,4 @@ c:\> build.sh all
72
87
73
88
If you need any information on the supported commands, please execute the `build.[cmd|sh] help` command.
74
89
75
-
This build script is powered by [FAKE](https://fake.build/); please see their API documentation should you need to make any changes to the [`build.fsx`](build.fsx) file.
76
-
77
-
### Conventions
78
-
The attached build script will automatically do the following based on the conventions of the project names added to this project:
79
-
80
-
* Any project name ending with `.Tests` will automatically be treated as a [XUnit2](https://xunit.github.io/) project and will be included during the test stages of this build script;
81
-
* Any project name ending with `.Tests` will automatically be treated as a [NBench](https://github.com/petabridge/NBench) project and will be included during the test stages of this build script; and
82
-
* Any project meeting neither of these conventions will be treated as a NuGet packaging target and its `.nupkg` file will automatically be placed in the `bin\nuget` folder upon running the `build.[cmd|sh] all` command.
83
-
84
-
### DocFx for Documentation
85
-
This solution also supports [DocFx](http://dotnet.github.io/docfx/) for generating both API documentation and articles to describe the behavior, output, and usages of your project.
86
-
87
-
All of the relevant articles you wish to write should be added to the `/docs/articles/` folder and any API documentation you might need will also appear there.
88
-
89
-
All of the documentation will be statically generated and the output will be placed in the `/docs/_site/` folder.
90
-
91
-
#### Previewing Documentation
92
-
To preview the documentation for this project, execute the following command at the root of this folder:
93
-
94
-
```
95
-
C:\> serve-docs.cmd
96
-
```
97
-
98
-
This will use the built-in `docfx.console` binary that is installed as part of the NuGet restore process from executing any of the usual `build.cmd` or `build.sh` steps to preview the fully-rendered documentation. For best results, do this immediately after calling `build.cmd buildRelease`.
99
-
100
-
### Release Notes, Version Numbers, Etc
101
-
This project will automatically populate its release notes in all of its modules via the entries written inside [`RELEASE_NOTES.md`](RELEASE_NOTES.md) and will automatically update the versions of all assemblies and NuGet packages via the metadata included inside [`common.props`](src/common.props).
102
-
103
-
If you add any new projects to the solution created with this template, be sure to add the following line to each one of them in order to ensure that you can take advantage of `common.props` for standardization purposes:
104
-
105
-
```
106
-
<Import Project="..\common.props" />
107
-
```
90
+
This build script is powered by [FAKE](https://fake.build/); please see their API documentation should you need to make any changes to the [`build.fsx`](build.fsx) file.
Copy file name to clipboardExpand all lines: src/Akka.Logger.Serilog/SerilogLoggingAdapterExtensions.cs
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,18 @@ public static class SerilogLoggingAdapterExtensions
15
15
/// <param name="destructureObjects">If true, the value will be serialized as a structured object if possible; if false, the object will be recorded as a scalar or simple array.</param>
// log a warning if the adapter is not a SerilogLoggingAdapter or BusLogging
28
+
adapter.Warning($"Cannot enrich log event with property {propertyName} because the adapter is not a {typeof(SerilogLoggingAdapter)} or {typeof(BusLogging)}.");
0 commit comments