Sfoglia il codice sorgente

fix data null error

master
yedajiang44 1 anno fa
parent
commit
0eb69ab285
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. +3
    -2
      simples/JT808.Gateway.SimpleServer/Impl/JT808MsgLogging.cs

+ 3
- 2
simples/JT808.Gateway.SimpleServer/Impl/JT808MsgLogging.cs Vedi File

@@ -17,9 +17,10 @@ namespace JT808.Gateway.SimpleServer.Impl
}
public void Processor((string TerminalNo, byte[] Data) parameter, JT808MsgLoggingType jT808MsgLoggingType)
{
if(Logger.IsEnabled(LogLevel.Debug))
var (number, data) = parameter;
if (Logger.IsEnabled(LogLevel.Debug))
{
Logger.LogDebug($"{jT808MsgLoggingType}-{parameter.TerminalNo}-{parameter.Data.ToHexString()}");
Logger.LogDebug("{type}-{number}-{data}",jT808MsgLoggingType,number,data?.ToHexString()??"no data.");
}
}
}


Caricamento…
Annulla
Salva