Skip to content

Commit

Permalink
Revert log level change for generated SQL
Browse files Browse the repository at this point in the history
Fixes #15888

There is no clear consensus which log level is best, so instead of making a break we have made it easy to specify any level wanted.
  • Loading branch information
ajcvickers committed Jun 16, 2019
1 parent 0b0a6dd commit 1ffb620
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 28 additions & 28 deletions src/EFCore.Relational/Properties/RelationalStrings.resx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
Expand All @@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
Expand Down Expand Up @@ -297,7 +297,7 @@
</data>
<data name="LogExecutingCommand" xml:space="preserve">
<value>Executing DbCommand [Parameters=[{parameters}], CommandType='{commandType}', CommandTimeout='{commandTimeout}']{newLine}{commandText}</value>
<comment>Debug RelationalEventId.CommandExecuting string System.Data.CommandType int string string</comment>
<comment>Information RelationalEventId.CommandExecuting string System.Data.CommandType int string string</comment>
</data>
<data name="LogExecutedCommand" xml:space="preserve">
<value>Executed DbCommand ({elapsed}ms) [Parameters=[{parameters}], CommandType='{commandType}', CommandTimeout='{commandTimeout}']{newLine}{commandText}</value>
Expand Down
4 changes: 2 additions & 2 deletions test/EFCore.Relational.Tests/Storage/RelationalCommandTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ public async Task Logs_commands_without_parameter_values(

Assert.Equal(2, logFactory.Log.Count);

Assert.Equal(LogLevel.Debug, logFactory.Log[0].Level);
Assert.Equal(LogLevel.Information, logFactory.Log[0].Level);
Assert.Equal(LogLevel.Debug, logFactory.Log[1].Level);

foreach (var (_, _, message, _, _) in logFactory.Log)
Expand Down Expand Up @@ -1004,7 +1004,7 @@ public async Task Logs_commands_parameter_values(
Assert.Equal(LogLevel.Warning, logFactory.Log[0].Level);
Assert.Equal(CoreResources.LogSensitiveDataLoggingEnabled(new TestLogger<TestRelationalLoggingDefinitions>()).GenerateMessage(), logFactory.Log[0].Message);

Assert.Equal(LogLevel.Debug, logFactory.Log[1].Level);
Assert.Equal(LogLevel.Information, logFactory.Log[1].Level);
Assert.Equal(LogLevel.Debug, logFactory.Log[2].Level);

foreach (var (_, _, message, _, _) in logFactory.Log.Skip(1))
Expand Down

0 comments on commit 1ffb620

Please sign in to comment.