Compare commits

..
2 Commits
Author SHA1 Message Date
xrain 56b5421290 change log for once output 2023-09-26 20:47:41 +08:00
xrain ab0da5415b update version 2023-03-28 06:39:55 +08:00
4 changed files with 8 additions and 13 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.100"
dotnet-version: "7.0.100"
- name: Publish
run: |
version=`git describe --tags`
+5 -9
View File
@@ -20,7 +20,6 @@ namespace SimApi.Logger
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception,
Func<TState, Exception, string> formatter)
{
var defautColor = Console.ForegroundColor;
Console.ForegroundColor = logLevel switch
{
LogLevel.Debug => ConsoleColor.DarkMagenta,
@@ -28,18 +27,15 @@ namespace SimApi.Logger
LogLevel.Warning => ConsoleColor.Yellow,
LogLevel.Error => ConsoleColor.Red,
LogLevel.Critical => ConsoleColor.DarkRed,
_ => defautColor
_ => ConsoleColor.White
};
Console.WriteLine(
$"[ {Name} ][ {SimApiUtil.CstNow.ToString("yyyy-MM-dd HH:mm:ss:ffff")} ][ {logLevel.ToString()} ]");
Console.ForegroundColor = defautColor;
Console.WriteLine($"{state}");
var message =
$"[ {Name} ][ {SimApiUtil.CstNow.ToString("yyyy-MM-dd HH:mm:ss:ffff")} ][ {logLevel.ToString()} ]\n{state}\n";
if (exception != null)
{
Console.WriteLine($"{exception}");
message += $"{exception}\n";
}
Console.WriteLine();
Console.WriteLine(message);
}
}
}
+1 -2
View File
@@ -1,7 +1,6 @@
# YYApi 基于Asp.net Core 3/5的一个基础辅助包
![CI](https://github.com/YY-Tech/YYApi/workflows/CI/badge.svg)
[![PublishNugetPackage](https://github.com/simcu/simapi-net/actions/workflows/nuget-publish.yml/badge.svg)](https://github.com/simcu/simapi-net/actions/workflows/nuget-publish.yml)
### 包含了以下组件:
1. 统一的参数检测,基础认证服务
+1 -1
View File
@@ -14,7 +14,7 @@
<SynchReleaseVersion>false</SynchReleaseVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageVersion>5.0.2</PackageVersion>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>